Selectors #Indentation #Stylus is "pythonic" (i.e. indentation-based). Whitespace is significant, so we substitute { and } with an indent, and an outdent as shown below:
CSS Preprocessor Advent Calendar 2012 19日目の記事です。 CSS Preprocessorは、CSSに拡張機能を持たせるメタ言語と呼ばれるものです。 CSS Preprocessorでよく耳にするものに、SassやLessがあります。 私も以前からSassを使用していましたが、最近Stylusを使い始めたので、SassとStylusの比較を行ってみます。 拡張子とシンタックス 使用できる拡張子は.sassと.scssの2つ。 拡張子によってSass記法かSCSS(Sassy CSS)記法に分かれます。 Sass記法(.sass) #header color: #000 h1 font-size: 2em SCSS記法(.scss) #header { color: #000; h1 { font-size: 2em; } } SCSS記法の方がもとも
Wielding the true power of a CSS preprocessor is an adventure. There are countless languages, syntaxes, and features, all ready for use right now. In this article, we will be covering the various features and benefits of using three different preprocessors—Sass, LESS, and Stylus. Introduction Preprocessors produce CSS that works in all browsers. CSS3 preprocessors are languages written for the sol
前回のつづき。Node.js(Express)で使えるSassは、1つ前の旧型のSassシンタックスで、現在最新のバージョン3形式での記述が出来なかったという話。これを改善する情報をいろいろ探し回った末、Stylusという新しいCSSテンプレートに出会ったぁ(ウルルン風に) 旧型Sass問題 Sassは、現在最新版のバージョン3でのシンタックスと、それ以前のシンタックスで微妙に書き方が違う。さらに、バージョン3からはSCSS形式も導入されたので、結構ややこしい。expressコマンドの-cオプションを使って、Sassを指定した場合に自動生成されるstyle.sassはこんな感じ。これは旧型のSassシンタックス。 body :padding 50px :font 14px "Lucida Grande", Helvetica, Arial, sans-serif a :color #00B
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く