Css module of single purpose classes for text transform
230 | 20 | 20 |
---|---|---|
bytes | selectors | declarations |
With npm
npm install --save-dev css-text-transform
git clone https://github.com/tachyons-css/css-text-transform
Using with PostCSS
Import the css module
@import "css-text-transform";
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-text-transform">
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.
/*
TEXT TRANSFORM
*/
.ttc { text-transform: capitalize; }
.ttu { text-transform: uppercase; }
.ttl { text-transform: lowercase; }
.ttn { text-transform: none; }
.ttf { text-transform: full-width; }
@media screen and (min-width: 48em) {
.ttc-ns { text-transform: capitalize; }
.ttu-ns { text-transform: uppercase; }
.ttl-ns { text-transform: lowercase; }
.ttn-ns { text-transform: none; }
.ttf-ns { text-transform: full-width; }
}
@media screen and (min-width:48em) and (max-width: 64em) {
.ttc-m { text-transform: capitalize; }
.ttu-m { text-transform: uppercase; }
.ttl-m { text-transform: lowercase; }
.ttn-m { text-transform: none; }
.ttf-m { text-transform: full-width; }
}
@media screen and (min-width: 64em) {
.ttc-l { text-transform: capitalize; }
.ttu-l { text-transform: uppercase; }
.ttl-l { text-transform: lowercase; }
.ttn-l { text-transform: none; }
.ttf-l { text-transform: full-width; }
}
- 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