1.0.6 • Published 9 years ago
css-widths v1.0.6
css-widths 0.0.6
Css module of single purpose classes for widths
Stats
| 276 | 32 | 32 |
|---|---|---|
| bytes | selectors | declarations |
Installation
With npm
npm install --save-dev css-widthsWith Git
git clone https://github.com/tachyons-css/css-widthsUsage
Using with PostCSS
Import the css module
@import "css-widths";Then process the CSS using the tachyons-cli
$ npm i -g tachyons-cli
$ tachyons-cli path/to/css-file.css > dist/t.cssUsing the CSS
The built CSS is located in the css directory. It contains an unminified and minified version.
You can either cut and paste that css or link to it directly in your html.
<link rel="stylesheet" href="path/to/module/css/css-widths">Development
The source CSS files can be found in the src directory.
Running $ npm start will process the source CSS and place the built CSS in the css directory.
The CSS
/*
WIDTHS
*/
.wi-bb { width: border-box; }
.wi-cb { width: content-box; }
.wi-mx { width: max-content; }
.wi-mn { width: min-content; }
.wi-av { width: available; }
.wi-fc { width: fit-content; }
.wi-at { width: auto; }
.wi-i { width: inherit; }
@media screen and (min-width: 48em) {
.wi-bb-ns { width: border-box; }
.wi-cb-ns { width: content-box; }
.wi-mx-ns { width: max-content; }
.wi-mn-ns { width: min-content; }
.wi-av-ns { width: available; }
.wi-fc-ns { width: fit-content; }
.wi-at-ns { width: auto; }
.wi-i-ns { width: inherit; }
}
@media screen and (min-width:48em) and (max-width: 64em) {
.wi-bb-m { width: border-box; }
.wi-cb-m { width: content-box; }
.wi-mx-m { width: max-content; }
.wi-mn-m { width: min-content; }
.wi-av-m { width: available; }
.wi-fc-m { width: fit-content; }
.wi-at-m { width: auto; }
.wi-i-m { width: inherit; }
}
@media screen and (min-width: 64em) {
.wi-bb-l { width: border-box; }
.wi-cb-l { width: content-box; }
.wi-mx-l { width: max-content; }
.wi-mn-l { width: min-content; }
.wi-av-l { width: available; }
.wi-fc-l { width: fit-content; }
.wi-at-l { width: auto; }
.wi-i-l { width: inherit; }
}Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Authors
License
ISC