-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
widths #6
Comments
We can read the css as applied to an element (so the computed css in the chrome debugger) but can't read individual style definitions from the css file. As I was writing that note I was having second thoughts about the design. My reason for going the way I did was that borders and padding are the "between columns" part. Hmm. If you specify width in css then padding is inside that width and margin and border is outside it? |
We may want to have the default |
...and |
++ on It's becoming a standard to The issue with that is then you would need to do extra calculation to work out the inner width, as the outer-width would come for free when setting style="width:{{width}}px" on the columns. Is there any pros or cons either way? (With regards to inner or outer widths?) |
@lcpriest -- thanks for the thought. After a successful test, we will probably be moving to use flexbox layout more extensively, which will hopefully eliminate the need for some of the calculations we currently make. Although using box-sizing everywhere seems like a sound practice for an app, IMO as an addon project, we can't assume or require it of our users. A part of the vision of declarative components is to give the user as much control as possible over the various bits the declarative component wraps. So if the user wants to render header cells with |
@BryanCrotaz In doc you have :
It seems more natural to me that what you declare explicitly are the outer widths, as these are what the component needs to layout the grid. For instance
rowHeight
has to be the outer height of rows; once we get horizontal scrolling going we will also need to know the column widths. OTOH the user has complete control of what goes in the grid & how its styled.Do we have a reliable method of reading widths and heights from css? If so we could write something like ("if you don't specify a width, ember-grid will use the width of an element styled in css as
.ember-grid .cell
; if you don't specifyrowHeight
ember grid will use height of element styled in css as.ember-grid .body .cell
).The text was updated successfully, but these errors were encountered: