-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Custom breakpoint: smaller than small #7644
Comments
+1 There are places where Setting a breakpoint at zero is pretty weird. Maybe there should be a What happens now if you don't set a zero breakpoint? |
I figured this would come up eventually. I think the two instances of Now, a lot more components reference We could make the "medium" breakpoint developer-configurable, which would globally change the breakpoint across every component. The question is if developers will understand what the "global medium breakpoint" is. You could also take each component that has a breakpoint and make those specific breakpoints developer-configurable. Most likely, though, even with this approach you'd still maybe have a global variable to inherit from, like so: $global-breakpoint: medium;
/// Breakpoint below which pagination items stack.
$pagination-breakpoint: $global-breakpoint; Thoughts? |
@gakimball To change medium is bad practice if you ask me. Unless you are starting from scratch, not only do you have to change the SCSS, but also the HTML. This should be avoided at all times. I once changed the 12 columns layout to 24 prior to Foundation 6. It was not fun. I had to change all of the columns in HTML. A quick fix is to use |
@pedzed That might be an acceptable trade-off, as long as we warn developers about the increased overhead. We think the words small, medium, large, etc. work well because they're about as generic as you can get (back in Foundation 2/3 we did phone, tablet, etc., which was too device-specific). With Foundation 6 you now have the power to change that, but you have to realize all of the documentation will not match 1-to-1 with what you're building now, because you're using your own names. So if you want to redefine medium, you can, but that's going to be on you to manage. We could also mandate that developers have breakpoints named "small" and "medium" in their |
@gakimball What you could also do is add a new variable Another problem is the font sizes. I believe it should be the same for |
maybe introduce some kind of naming convention (documented) for breakpoints scss map - so only breakpoints named xsmall, small, medium, large, xlarge, xxlarge will work. It's all about pixels anyway. This way there will be no need to do major extra adjustments to current scss codebase. |
To be honest, I'd rather give up a bit of configurability for simplicity. I say we make @gakimball, to your point regarding the hardcoded use of |
Then (for me) it would be: $breakpoints: (
small: 0,
medium: 480px,
large: 640px,
xlarge: 1024px,
xxlarge: 1200px,
// xxxlarge: 1440px,
); Medium I just need the
👍 This is what I initially wanted, but for simplicity's sake, just use the first in the list as default. |
@pedzed Hmm… if |
You are right. But would you personally call it I am fine with |
…nt, or if small is not 0, closes #7644
After some internal discussion on this, we're making the call to define two rules for
It's a bit limiting, perhaps, but you still have a lot of flexibility in how breakpoints are managed. We can also add a line to the docs noting that I'd also like to ditch the two You can see the change on the 6.2 branch: ce18364 |
To be honest, it saddens me that this is the decision. What about just getting the smallest value of the list by using a custom function? It's not that hard.
What do you mean? |
I just noticed that Foundation comes with a function called |
If you add a custom breakpoint, say
xsmall
, the default will remain atsmall
. Please, read further for clarification.This is what I added in my settings:
An example of this issue is that if you add
text-center
in the HTML, it keeps the default alias tosmall-text-center
, whereas it should be an alias forxsmall-text-center
. The workaround is to usexsmall-text-center
instead oftext-center
.This is an issue which could be fixed by not hardcoding
small
like in /scss/typography/_alignment.scss#L9:Edit: This counts for things like font size as well.
The text was updated successfully, but these errors were encountered: