Replies: 4 comments 4 replies
-
My personal preference is "mobile first" which biases towards "X and up" only breakpoints, as designs should be additive - "design mobile first and then desktop layouts is mobile stuff plus some extra bits" rather than "design desktop first and then mobile layouts are desktop stuff with a bunch of stuff taken away". I'm a really big fan of naming the ranges that we provide, rather than the individual breakpoint numbers. This is possibly the best ASCII art I've ever done. "768px" isn't a super useful number as it lacks context "a media query of 768px and up" feels better to me. I think curation at the "range" level lets us impart more information to the use as we can name things like "when the navigation column is expanded" and "when the navigation is collapsed" which is harder if we're limiting ourselves to naming a number (768px) and "up/down". |
Beta Was this translation helpful? Give feedback.
-
Thanks for kicking off this discussion and providing a great prompt! I'll start by addressing these point for point and following up with my personal preferences.
This is quite a tough question to answer generically. With most layout scenarios there are multiple ways to solve the same problem. While I think we should have a recommended approach (e.g. default e.g. What example best describes the author's intent? .my-class {
padding: 0px;
@media md-up { padding: 20px }
@media lg-up { padding: 0px }
}
// vs
.my-class {
@media md-only { padding: 20px }
}
The easy answer is yes, we have the ability to add lint rules for media queries via
Yes, imo we should absolutely encourage mobile first (e.g.
Here is a WIP that could be reference on the Polaris documentation site:
Personal takeA common theme throughout my feedback is around exposing an API that engineers want to use and allows them to best describe their intent. Not accounting for 3rd party apps, I've estimated we are already using ~300 Lastly, I want to mention that our most recent addition of |
Beta Was this translation helpful? Give feedback.
-
I'd love to be able to build everything mobile up only but that's just not possible at Shopify. Historically designers default to desktop and smaller screens are more an afterthought, in both design and prototyping. My only concerns here are with All that said we are a design system and have to be flexible so if there's a want or need for |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is the one you were mentioning @BPScott—yesterday, I did a breakpoint audit in Polaris and created a spreadsheet* to try and understand what's going on better. Wanted to list it here since I think it will be helpful in determining our approach moving forward. *If this link breaks in the future I've created a simplified version of the tables in GitHub. |
Beta Was this translation helpful? Give feedback.
-
I am a huge fan of the new functionality for breakpoints. I am interested though how useful providing
up
down
andonly
is to product teams.total breakpoint tokens * 3 (up + down + only)
breakpoints?down
breakpoints are allowedup
down
andonly
to developers and designers?Before we make this API public I would love to get folks opinions on this.
Beta Was this translation helpful? Give feedback.
All reactions