Comments (2)
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:
Example on Stackblitz: https://stackblitz.com/edit/angular-ivy-khexpu
from primeflex.
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)
- 3.1.1 : Load from CDN is mandatory (?)
- How to extend background colors?
- Animation: Respect CSS `prefers-reduced-motion`
- double code in docs
- [help} grid system for forms HOT 3
- Support more breakpoints HOT 1
- Support arbitrary value HOT 1
- How to use Primeflex with Dart SASS? HOT 1
- a small typo in the document
- Documentation: Responsive prefix indicator mis-identified
- flex-shrink docs show flex-grow classes
- Extend flex and support both minimum ánd maximum width in responsive classes
- Left Menu Scroll is Overlapped by .layout-content div this makes the screen not scrollable. HOT 2
- `origin-top-left` class does not work because value is invalid
- Error 520 https://unpkg.com/primeflex@latest/primeflex.css
- [Showcase] Transition Examples Broken HOT 1
- Is this repository still actively maintained? HOT 2
- Is there any way to use custom heights and widths inline?
- Missing important classes in primeflex
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primeflex.