Giter Site home page Giter Site logo

Comments (2)

nharrer avatar nharrer commented on May 25, 2024

Yes, the same here. Maybe I am misunderstanding the documentation. Shouldn't sm:xxxx apply xxxx to small screens only? But it seems to be the opposite.

Example with primeflex 3.3.1:

<div class="flex flex-row sm:flex-column gap-2" style="background-color: red">
  <div>aaaa</div>
  <div>bbbb</div>
  <div>cccc</div>
</div>

I would expect to have a flex-direction of column for screens <= 576px. And a row layout otherwise. But it's just the other way around:

image
image
Example on Stackblitz: https://stackblitz.com/edit/angular-ivy-khexpu

from primeflex.

nharrer avatar nharrer commented on May 25, 2024

Please ignore my last comment. Coming from Angular Flex-Layout, that seemed to be the way it was supposed to work.

But in fact, it is a mobile-first breakpoint system. I only realized that after learning to use Tailwind and studying their documentation:

Where this approach surprises people most often is that to style something for mobile, you need to use the unprefixed version of a utility, not the sm: prefixed version. Don’t think of sm: as meaning “on small screens”, think of it as “at the small breakpoint“.

So sm: means at the breakpoint sm and above. It makes sense now, and everything is working as intended.

However, I have a little critique: The PrimeFlex documentation doesn't mention that at all. So for people some people with a different background, this can be a bit confusing.

from primeflex.

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.