tachyons-modular-widths
v1.0.0
Published
CSS module for setting widths http://tachyons.io.
Downloads
8
Readme
tachyons-modular-widths 1.0.0
CSS module for setting widths http://tachyons.io.
Stats
483 | 22 | 22 ---|---|--- bytes | selectors | declarations
Installation
With npm
npm install --save-dev tachyons-modular-widthsLearn more about using css installed with npm:
- https://webpack.github.io/docs/stylesheets.html
- https://github.com/defunctzombie/npm-css
With Git
http:
git clone https://github.com/particlecss/tachyons-modular.gitssh:
git clone [email protected]:particlecss/tachyons-modular.gitUsage
Using with Postcss
Import the css module
@import "tachyons-modular-widths";Then process the css using the tachyons-cli
$ npm i -g tachyons-cli
$ tachyons path/to/css-file.css > dist/t.cssUsing the css
CDN
The easiest and most simple way to use the css is to use the cdn hosted version. Include it in the head of your html with:
<link rel="stylesheet" href="http://unpkg.com/[email protected]/build/build.min.css" />Locally
The built css is located in the build 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/build/build.min.css">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
Docs: http://tachyons.io/docs/layout/widths/
Base:
w = width
Modifiers
1 = 1st step in width scale
2 = 2nd step in width scale
3 = 3rd step in width scale
4 = 4th step in width scale
5 = 5th step in width scale
-10 = literal value 10%
-20 = literal value 20%
-25 = literal value 25%
-33 = literal value 33%
-34 = literal value 34%
-40 = literal value 40%
-50 = literal value 50%
-60 = literal value 60%
-75 = literal value 75%
-80 = literal value 80%
-100 = literal value 100%
-third = 100% / 3 (Not supported in opera mini or IE8)
-auto = string value auto
Media Query Extensions:
-ns = not-small
-m = medium
-l = large
*/
/* Width Scale */
.w1 { width: 1rem; }
.w2 { width: 2rem; }
.w3 { width: 4rem; }
.w4 { width: 8rem; }
.w5 { width: 16rem; }
.w-10 { width: 10%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-33 { width: 33%; }
.w-34 { width: 34%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-100 { width: 100%; }
.w-third { width: calc( 100% / 3 ); }
.w-two-thirds { width: calc( 100% / 1.5 ); }
.w-auto { width: auto; }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
