Skip to content
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

u-size---- Consistency? #26

Closed
oleersoy opened this issue Sep 20, 2015 · 4 comments
Closed

u-size---- Consistency? #26

oleersoy opened this issue Sep 20, 2015 · 4 comments

Comments

@oleersoy
Copy link
Contributor

The of the u-sizeXofY utilities set width only...except for the u-sizeFull. It's sets display and box-sizing.

Just curious as to whether display and box-sizing should be left for base?

@vincentorback
Copy link

I think mixing whatever SUIT components/utilities you need should be up to you so if base.css isn’t included the utility still works. Also u-sizeFit, u-sizeFill and u-sizeFull all set the display property and other styles. It would be to many utilities to set all properties right?�

@giuseppeg
Copy link
Member

u-sizeFull

display and box-sizing are precautions to avoid undesired behaviour when the element is 100% wide eg. if the element is inline-block and its width is 100% it'll suffer from the "spacing between inline-block elements issue".

u-sizeFit and u-sizeFitAlt

Are similar to Bootstrap's pull-left and pull-right — no width involved here.

u-sizeFill

Takes the available space — no fixed width.

@oleersoy
Copy link
Contributor Author

@giuseppeg could this be left open until all the questions have been answered?

I'll add the design rationale to the comments and update the test, I just want to make sure we are being as consistent as possible.

We are also currently having a discussion about whether components should assume the presence of base.css in order to stay as DRY as possible. This relates to that:
suitcss/suit#112

Also since we are considering switching to Flexbox for the grid, and making it pure flexbox, then it's possible that some of the utilities might be better suited if wrapped in a flexbox implementation. If I understand the design consideration better, I'll be better able to help:
suitcss/suit#113

This also relates to:
suitcss/suit#114

If the test clearly showed what happens to inline-block elements in terms of the spacing around the element issue, then the design is easier to understand.

@oleersoy
Copy link
Contributor Author

Also suppose you have a layout where you are using inline-block create a layout. And they are laid out like this:
1 2 3
4 5 6

And suppose we want 5 be the full width of the container, instead of it's current location between 4 and 5, so we apply u-sizeFull, to get:

1 2 3
5555
4 6

5555 is now not going to be aligned properly with the other elements right? It's going to extend beyond them a little?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants