On this page
breakpoints
Breakpoint prefix | Minimum Maximum | CSS |
---|---|---|
`min_sm` | 640px | `@media (min-width: 640px) { ... }` |
`min_md` | 768px | `@media (min-width: 768px) { ... }` |
`min_lg` | 1024px | `@media (min-width: 1024px) { ... }` |
`min_xl` | 1280px | `@media (min-width: 1280px) { ... }` |
`min_2xl` | 1536px | `@media (min-width: 1536px) { ... }` |
`max_sm` | 640px | `@media (max-width: 640px) { ... }` |
`max_md` | 768px | `@media (max-width: 768px) { ... }` |
`max_lg` | 1024px | `@media (max-width: 1024px) { ... }` |
`max_xl` | 1280px | `@media (max-width: 1280px) { ... }` |
`max_2xl` | 1536px | `@media (max-width: 1536px) { ... }` |
Wrapper concept
elter's mediaQuery uses the same wrapper format as conventional CSS.
This makes it easy to transition from CSS.
Write and compile
Take a look at the media queries in compare them.
If you wrap a property and selector, the selector will be split and output.
Best Practices
To appear multiple times MediaQuery is the only css that can achieve dry code.
It is recommended to change one value to all.