Css module of single purpose classes for transition duration
243 | 24 | 24 |
---|---|---|
bytes | selectors | declarations |
With npm
npm install --save-dev css-transition-duration
git clone https://github.com/tachyons-css/css-transition-duration
Using with PostCSS
Import the css module
@import "css-transition-duration";
Then process the CSS using the tachyons-cli
$ npm i -g tachyons-cli
$ tachyons-cli path/to/css-file.css > dist/t.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-transition-duration">
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.
/*
TRANSITION DURATION
*/
.td-1 { transition-duration: 120ms; }
.td-2 { transition-duration: .3s; }
.td-3 { transition-duration: .6s; }
.td-4 { transition-duration: 1s; }
.td-5 { transition-duration: 5s; }
.td-i { transition-duration: inherit; }
@media screen and (min-width: 48em) {
.td-1-ns { transition-duration: 120ms; }
.td-2-ns { transition-duration: .3s; }
.td-3-ns { transition-duration: .6s; }
.td-4-ns { transition-duration: 1s; }
.td-5-ns { transition-duration: 5s; }
.td-i-ns { transition-duration: inherit; }
}
@media screen and (min-width:48em) and (max-width: 64em) {
.td-1-m { transition-duration: 120ms; }
.td-2-m { transition-duration: .3s; }
.td-3-m { transition-duration: .6s; }
.td-4-m { transition-duration: 1s; }
.td-5-m { transition-duration: 5s; }
.td-i-m { transition-duration: inherit; }
}
@media screen and (min-width: 64em) {
.td-1-l { transition-duration: 120ms; }
.td-2-l { transition-duration: .3s; }
.td-3-l { transition-duration: .6s; }
.td-4-l { transition-duration: 1s; }
.td-5-l { transition-duration: 5s; }
.td-i-l { transition-duration: inherit; }
}
- 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
ISC