0.2.0 • Published 7 years ago
cata-breakpoints v0.2.0
Cata breakpoints
Custom media queries
These are predefined values and recommendations based on this article http://bradfrost.com/blog/post/7-habits-of-highly-effective-media-queries I prefer em instead of px, and I recommend applying a subset of values depending on the type of project and personal preferences.
@custom-media --sm-viewport (min-width: 24em);
@custom-media --md-viewport (min-width: 46.8em);
@custom-media --lg-viewport (min-width: 50em);
@custom-media --xl-viewport (min-width: 60em);How use
@media (--sm-viewport) {
div {
width: 200px;
}
}Installation
NPM
npm install cata-breakpointsYarn
yarn add cata-breakpointsDownload
Testing
Install Node (comes with npm) and run:
npm installOr install Yarn and run:
yarnTo generate a build:
npm run buildTo lint code with postcss-bem-linter and stylelint
npm run lintTo generate the testing build.
npm run build-testBasic visual tests are in test/index.html.
Browser support
- Google Chrome
- Firefox
- Safari
- Opera
- Internet Explorer 9+
0.2.0
7 years ago
0.1.0-alpha.1
9 years ago