[CSS]変数が使えるスタイルシート -Moonfall
Moonfallは、CGIを利用してスタイルシートを指定するもので、変数を利用できることによりスタイルシート宣言の簡略化が可能です。

変数を利用できることは、とても便利で、下記のように記述することができます。
通常の指定方法
#site_container{
width:1000px;
min-width:1000px;
}
#top_container{
width:1000px;
font-size:1.1em;
}
Moonfallを使用した指定方法
moonfall.cgi
#!/usr/local/bin/env moonfall page_width=1000 medium_em="1.1em"
moonfall.css
#site_container{
width:[page_width];
min-width:[page_width];
}
#top_container{
width:[page_width];
font-size:[medium_em];
}
Post on:2007年9月6日








