Skip to content

Commit

Permalink
translate CSS Style
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuruog committed Jan 26, 2013
1 parent abbf658 commit 93ce940
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions docs/css-style.md
@@ -1,11 +1,18 @@
+ 元文書: [stylus/docs/css-style.md at f9ed220d7e5f0b44aeaca58ffd6490566b5f0757 · LearnBoost/stylus · GitHub]
(https://github.com/LearnBoost/stylus/blob/f9ed220d7e5f0b44aeaca58ffd6490566b5f0757/docs/css-style.md
"stylus/docs/css-style.md at f9ed220d7e5f0b44aeaca58ffd6490566b5f0757 · LearnBoost/stylus · GitHub")

## CSS Style
## CSS Style [原文](http://learnboost.github.com/stylus/docs/css-style.html)

Stylus transparently supports a regular CSS-style syntax. This means you don't need an alternative parser, or specify that a certain file uses a specific style.
Stylus transparently supports a regular CSS-style syntax.
This means you don't need an alternative parser, or specify that a certain file uses a specific style.

### Example
Stylusは正規のCSSスタイルを標準でサポートしています。
これは、パーサーを選択したり、特定のファイルで使用する詳細なスタイルについて明示する必要がないことを意味します。

Below is a small style using the indented approach:
###

以下の小さなスタイルは(Stylusの)インデントアプローチを利用しています。

border-radius()
-webkit-border-radius arguments
Expand All @@ -22,8 +29,8 @@
border 1px solid
border-radius 5px

Since braces, colons, and semi-colons are optional, we could write this example just as we would with normal CSS:
この例は、(通常書くであろう)CSSとしても書くことが出来ます。つまり、括弧、コロン、セミコロンは任意です。

border-radius() {
-webkit-border-radius: arguments;
-moz-border-radius: arguments;
Expand All @@ -42,8 +49,8 @@
border-radius: 5px;
}

Since we may mix and match the two variants, the following is valid as well:
異なるこれらの書き方を混在させてしまうこともありますが、次の書き方は有効です。

border-radius()
-webkit-border-radius: arguments;
-moz-border-radius: arguments;
Expand All @@ -60,8 +67,8 @@
border: 1px solid;
border-radius: 5px;

Variables, functions, mixins, and all the other features provided by Stylus still work as expected:
その場合であっても、Variablesfunctions、mixinsなど、Stylusが提供するすべての機能は正しく動作します。

main-color = white
main-hover-color = black

Expand All @@ -72,6 +79,13 @@

body a { color: main-color; &:hover { color: main-hover-color; }}

There are a few caveats to this rule: since the two styles may be mixed and matched, some indentation rules still apply. So although not _every_ plain-CSS stylesheet will work with zero modification, this feature allows those who prefer CSS syntax to continue doing so while leveraging Stylus' other powerful features.
There are a few caveats to this rule:
since the two styles may be mixed and matched, some indentation rules still apply.
So although not _every_ plain-CSS stylesheet will work with zero modification,
this feature allows those who prefer CSS syntax to continue doing so while leveraging Stylus' other powerful features.

しかし、このルールには幾つかの注意点があります。
2つのスタイルを混在させることができるのですが、インデントルールは適用されたままとなります。
とは言っても、 _すべての_ プレーンなCSSは修正することなしに動作します。
この機能により、CSS構文を維持しながら、Stylusの他の強力な機能を活用することができます。

0 comments on commit 93ce940

Please sign in to comment.