-
Notifications
You must be signed in to change notification settings - Fork 678
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
undefined media queries of screen size under 30em on tachyons.css #697
Comments
It's because the base classes are mobile by default, following the mobile-first architecture. You already "start" below 30em and then progress upwards. But be aware of #578. |
My mobile phone have a screen width less than 30em. tachyons.css said the following,
I strongly insist that "@media screen and (min-width: 30em)" is corrected to "@media screen and (max-width: 30em)". |
Yes, that is intended. On a mobile-first approach you don't need a media query to target a small device, it's by default applied to it as the base. But if you have a layout created for a desktop view and now need to adapt it for mobile view, then you need to use Take a look at the media-queries variables names for tachyons: @custom-media --breakpoint-not-small screen and (min-width: 30em);
@custom-media --breakpoint-medium screen and (min-width: 30em) and (max-width: 60em);
@custom-media --breakpoint-large screen and (min-width: 60em); When you apply a base class on a mobile-first architecture, you are already at "small". After 30em you are at "not small", between 30em and 60em you are at "medium" and after 60em you are at "large". Roughly, what the |
Now I am wondering that "breakpoint-not-small' never affected anything in spite of existence of "breakpoint-not-small".
It looks you can remove ""breakpoint-not-small"" from tachyons.css. |
Breakpoints have been refactored here: #705 |
I guess that '@media screen and (min-width: 30em)' on tachyons.css is a typo from (max-width: 30em).
I clearly point out word, 'min' and ' max'.
tachyons.css has the below media queries.
screen size under 30em is only not defined.
I hope you will comment about this issue.
The text was updated successfully, but these errors were encountered: