项目作者: raulghm

项目描述 :
cata-breakpoints
高级语言: CSS
项目地址: git://github.com/raulghm/cata-breakpoints.git
创建时间: 2017-04-17T14:19:49Z
项目社区:https://github.com/raulghm/cata-breakpoints

开源协议:MIT License

下载


Cata breakpoints

Build Status

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.

  1. @custom-media --sm-viewport (min-width: 24em);
  2. @custom-media --md-viewport (min-width: 46.8em);
  3. @custom-media --lg-viewport (min-width: 50em);
  4. @custom-media --xl-viewport (min-width: 60em);

How use

  1. @media (--sm-viewport) {
  2. div {
  3. width: 200px;
  4. }
  5. }

Installation

NPM

  1. npm install cata-breakpoints

Yarn

  1. yarn add cata-breakpoints

Download

Download

Testing

Install Node (comes with npm) and run:

  1. npm install

Or install Yarn and run:

  1. yarn

To generate a build:

  1. npm run build

To lint code with postcss-bem-linter and stylelint

  1. npm run lint

To generate the testing build.

  1. npm run build-test

Basic visual tests are in test/index.html.

Browser support

  • Google Chrome
  • Firefox
  • Safari
  • Opera
  • Internet Explorer 9+