PostCSS plugin Breakpoint viewport sizes and media queries..
@breakpoint 0 543px {
body {
background: red;
}
}
@breakpoint-up sm {
body {
background: orange;
}
}
@media (min-width: 0) and (max-width: 543px) {
body {
background: red;
}
}
@media (min-width: 544px) {
body {
background: orange;
}
}
postcss([ require('postcss-breakpoints')({options}) ])
See PostCSS docs for examples for your environment.
- Type: object
- Default:
breakpoints: {
xs: '0 543px',
sm: '544px 767px',
md: '768px 991px',
lg: '992px 1199px',
xl: '1200px'
}
- Type: string
- Default: ""
@breakpoint 0 1200px
@breakpoint 1200px
@breakpoint-up xs
@breakpoint-up sm
@breakpoint-up md
@breakpoint-up lg
@breakpoint-up xl
@breakpoint-down xs
@breakpoint-down sm
@breakpoint-down md
@breakpoint-down lg
@breakpoint-only xs
@breakpoint-only sm
@breakpoint-only md
@breakpoint-only lg
@breakpoint-only xl
@breakpoint-between xs sm
@breakpoint-between sm md
@breakpoint-between md lg