Giter VIP home page Giter VIP logo

Comments (5)

cristianofromagio avatar cristianofromagio commented on May 27, 2024

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.

from tachyons.

 avatar commented on May 27, 2024

Hi @cristianofromagio,

My mobile phone have a screen width less than 30em.
All of media queries on tachyons.css do not affect my mobile phone.
"screen and (min-width: 30em)" means screen width MORE than 30em.

tachyons.css said the following,

  • screen size < 30em
    No effect.
  • 30em < screen size < 60em
    Effect '@media screen and (min-width: 30em) and (max-width: 60em)'
  • 60em < screen size
    Effect '@media screen and (min-width: 60em)'

I strongly insist that "@media screen and (min-width: 30em)" is corrected to "@media screen and (max-width: 30em)".

from tachyons.

cristianofromagio avatar cristianofromagio commented on May 27, 2024

All of media queries on tachyons.css do not affect my mobile phone.

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 max-width. Either way, media queries should be viewed as "adaptations". Whatever approach you use (mobile-first or not) the base classes you use are always going to be applied to the element, unless if overwrite by the media-query declarations ("adaptation").

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 min-width rule says is "apply these classes if the screen size is X value or more" and what the max-width rule says is "apply these classes if the screen size is X value or less".

from tachyons.

 avatar commented on May 27, 2024

Hi @cristianofromagio,

Now I am wondering that "breakpoint-not-small' never affected anything in spite of existence of "breakpoint-not-small".

  • "small" as screen size < 30em
    No effect.
  • "medium" as 30em < screen size < 60em
    Effect '@media screen and (min-width: 30em) and (max-width: 60em)'
  • "large"" as 60em < screen size
    Effect '@media screen and (min-width: 60em)'

It looks you can remove ""breakpoint-not-small"" from tachyons.css.
If you would not remove it, you are misleading "breakpoint-not-small" is still alive.

from tachyons.

dangayle avatar dangayle commented on May 27, 2024

Breakpoints have been refactored here: #705

from tachyons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.