JavaScriptやJSONでCSSを書ける、というよりもCSS Preprocessorに近い感じのJSライブラリ AbsurdJS を試してみた。 AbsurdJSはサーバー、クライアントの両方で使用できる。 ビルドツールとしてGrunt-absurdが提供されているのでこれを使って試してみる。 Gruntの設定する。以下のようにした。 最終的に1つのファイルにまとめるためにコンパイルが必要とのことなので、import.jsというファイルをmanifestにした。 インポートの順序はcssと同じく、overwriteされるので重要。 ノーマル 疑似要素 ネストネスト記述もほかのpreprocessorと同じく利用可能 変数・関数 mixin pluginmixinににているけど、property - value のペアを定義 media-query rawデータ json、cssファ