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

Make spacer utils responsive #20926

Merged
merged 8 commits into from
Nov 1, 2016
Merged

Make spacer utils responsive #20926

merged 8 commits into from
Nov 1, 2016

Conversation

mdo
Copy link
Member

@mdo mdo commented Oct 18, 2016

This makes the spacer utilities responsive. Instead of .mt-0 for example, we have .mt-sm-0. Bit longer of a class name, but more versatile.

@mdo
Copy link
Member Author

mdo commented Oct 18, 2016

Biggest question for this—should we keep the non-responsive classes in addition to the responsive ones?

@mdo
Copy link
Member Author

mdo commented Oct 18, 2016

Second biggest question is the scale—I'm thinking we need more levels to the spacers. Something like .25rem, .5rem, 1rem, 1.5rem, and 3rem.

@mdo mdo force-pushed the responsive-spacers branch from dd850a8 to e4c4045 Compare October 19, 2016 02:56
@cdelarbre
Copy link

cdelarbre commented Oct 21, 2016

A small suggestion for levels spacers :

p-0 => 0
p-01 => $spacer * .1
p-02 => $spacer * .2
p-03 => $spacer * .3
p-04 => $spacer * .4
p-05 => $spacer * .5
p-1  => $spacer 
p-15 => $spacer * 1.5
p-2  => $spacer * 2
p-25 => $spacer * 2.5
p-3  => $spacer * 3
p-35 => $spacer * 3.5
p-4  => $spacer * 4
p-45 => $spacer * 4.5
p-5  => $spacer * 5

@Stadly
Copy link

Stadly commented Oct 28, 2016

+1

@mdo mdo mentioned this pull request Oct 30, 2016
@mdo mdo added this to the v4.0.0-alpha.6 milestone Nov 1, 2016
@mdo
Copy link
Member Author

mdo commented Nov 1, 2016

This PR now includes the same approach as #20934:

  • The xs tier no longer has a breakpoint abbreviation in the class name. So instead of .mt-xs-0, it's just .mt-0. Super easy transition from what's there currently. This works out well because none of these classes are bound by media queries given they apply to min-width: 0 and up.
  • The rest of the default tiers—sm, md, lg, and xl—all include their abbreviations. So for a large breakpoint, you'd use .mt-lg-0.

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

Successfully merging this pull request may close these issues.

3 participants