私の手はあなたの色だけど、恥ずかしい
こんなに白い心を身につけるなんて。
- ウィリアム・シェイクスピア、マクベス
シェイクスピアは、CSS で「color」ではなく「color」を使用することに妥協しなかっただろうし、あなたもそうすべきではありません。そうすることで自分の文章の完全性が完成することを彼は認識していたでしょう。
postcss-spiffing
を使用して、どこでも適切なイギリス英語を使用して CSS を記述します。
これと muan によるspiffing
の主な違いは、これがpostcss
と統合されており、正規表現を使用しないことです。
npm install postcss-spiffing --save-dev
/* Your well-spelt CSS */
body {
background-colour : grey;
transparency : 0.3 ;
text-align : centre;
text-transform : capitalise;
border : 1 px solid grey;
}
span {
font-weight : plump;
}
. frame {
background-photograph : url ( "/queen.png" ) !please;
}
. hello {
content : "subjects" ;
colour : grey;
}
に行きます:
body {
background-color : gray;
opacity : 0.7 ;
text-align : center;
text-transform : capitalize;
border : 1 px solid gray;
}
span {
font-weight : bold;
}
. frame {
background-image : url ( "/queen.png" ) !important ;
}
. hello {
content : "subjects" ;
color : gray;
}
var postcss = require ( "postcss" ) ;
var spiffing = require ( "postcss-spiffing" ) ;
var fs = require ( "fs" ) ;
var css = fs . readFileSync ( "random.css" ) ;
console . log ( postcss ( spiffing ( ) ) . process ( css ) . css ) ;
これをgulp
で使用するには、 gulp-postcss を使用します。
colour
color
に変わるplump
でbold
capitalise
capitalize
する!important
へ行って!please
centre
center
に行くgrey
gray
になるbackground-photograph
、 background-image
に移動します ( list-style-photograph
もサポートされています)transparency
opacity
になります (透明度は不透明度の逆なので、(1-n) になります)storey
z-index
に移動します ( ground
1 に等しいなど)