1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-03-16 04:10:01 +01:00

Merge pull request #968 from awalGarg/patch-1

[css/en] corrected definition of ~ selector, added |
This commit is contained in:
Levi Bostian 2015-02-18 13:20:22 -06:00
commit 5e675548c3

View File

@ -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