diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-02-18 13:20:22 -0600 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-02-18 13:20:22 -0600 |
commit | 5e675548c3f2b5c17d5478f74da92b3f6c9cfc81 (patch) | |
tree | 2aba4213c5dc270ef4dd4152347c8243564650a0 | |
parent | a1d966618b4892c47d53eff278a664b77af65259 (diff) | |
parent | e1667cc836cc1b5f43404c0d54c02d38d9480ec8 (diff) |
Merge pull request #968 from awalGarg/patch-1
[css/en] corrected definition of ~ selector, added |
-rw-r--r-- | css.html.markdown | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/css.html.markdown b/css.html.markdown index b93c2842..9e8664b3 100644 --- a/css.html.markdown +++ b/css.html.markdown @@ -43,7 +43,7 @@ You can target all elements on the page using asterisk! */ /* Given an element like this on the page: -<div class='some-class class2' id='someId' attr='value' /> +<div class='some-class class2' id='someId' attr='value' otherAttr='en-us foo bar' /> */ /* you can target it by its name */ @@ -70,8 +70,11 @@ div { } /* or ends with (CSS3) */ [attr$='ue'] { font-size:smaller; } -/* or even contains a value (CSS3) */ -[attr~='lu'] { font-size:smaller; } +/* or select by one of the values from the whitespace separated list (CSS3) */ +[otherAttr~='foo'] { font-size:smaller; } + +/* or value can be exactly “value” or can begin with “value” immediately followed by “-” (U+002D) */ +[otherAttr|='en'] { font-size:smaller; } /* and more importantly you can combine these together -- there shouldn't be |