jevakallio/css-properly
μκ°
Write CSS Properly π¬π§π§
μΉ λ° μ± κ°λ°μΈ‘μ λ μ€ν μ¦κ°
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- κΈ°λ‘ μμ§ μ€
μλ‘ κ²ΉμΉλ κΈ°κ°μ μμ¦κ°λμ΄λ©° μΌλ³ ν©κ³κ° μλλλ€. μΈ‘μ κ°μ΄ μμΌλ©΄ λΉμ λ‘λλ€. μ€νλ κ΄μ¬λλ₯Ό λνλ΄λ©° νμ§μ 보μ₯νμ§ μμ΅λλ€.
README.md
Originalcss-properly
PostCSS plugin for people who prefer to write English properly.
.foo {
colour: black;
background-colour: lightgrey;
text-align: centre;
}
Supported translations:
| From (Proper) | To (American) | Rationale |
|---|---|---|
colour |
color |
There's a u in "colour" |
centre |
center |
It's spelt "centre" |
capitalise |
capitalize |
Don't even get me started |
padding-ton |
padding-top |
When you're thinking of your favourite bear |
z-index |
z-index |
It's the same but it's pronounced "zed", not "zee" |
behaviour |
behavior |
Oh, behave! |
Pull requests for further translations welcome!
Usage
As a PostCSS plugin
Assuming you are using npm to manage dependencies, install css-properly with:
npm install --save-dev css-properly
Check your project for existing PostCSS config: postcss.config.js
in the project root, "postcss" section in package.json
or postcss in bundle config.
If you already use PostCSS, add the plugin to plugins list:
module.exports = {
plugins: [
+ require('css-properly'),
require('autoprefixer')
]
}
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
As a standalone tool using PostCSS CLI
First, install postcss-cli and css-properly globally:
npm install -g postcss-cli css-properly
Follow your heart:
postcss [input.css] --use css-properly [-o|--output output.css] [--watch|-w]
postcss <input.css>... --use css-properly --dir <output-directory> [--watch|-w]
postcss <input-directory> --use css-properly --dir <output-directory> [--watch|-w]
postcss <input-glob-pattern> --use css-properly --dir <output-directory> [--watch|-w]
postcss <input.css>... --use css-properly --replace
License
κ΄λ ¨ νλ‘μ νΈ μ΄ν΄λ³΄κΈ°
λΆλ¬μ€λ μ€β¦