From 4d0c340347925651c8c0e4db560130f9a918d460 Mon Sep 17 00:00:00 2001 From: Denis Malinochkin Date: Mon, 16 Feb 2015 12:44:33 +0300 Subject: [css/en] Fix typos --- css.html.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'css.html.markdown') diff --git a/css.html.markdown b/css.html.markdown index e058d691..b93c2842 100644 --- a/css.html.markdown +++ b/css.html.markdown @@ -37,7 +37,7 @@ selector { property: value; /* more properties...*/ } /* the selector is used to target an element on page. -You can target all elments on the page using asterisk! */ +You can target all elements on the page using asterisk! */ * { color:red; } /* @@ -49,7 +49,7 @@ Given an element like this on the page: /* you can target it by its name */ .some-class { } -/*or by both classes! */ +/* or by both classes! */ .some-class.class2 { } /* or by its element name */ @@ -89,7 +89,7 @@ div.some-parent > .class-name {} and is child of a div with class name "some-parent" IN ANY DEPTH */ div.some-parent .class-name {} -/* warning: the same selector wihout spaaace has another meaning. +/* warning: the same selector without space has another meaning. can you say what? */ div.some-parent.class-name {} @@ -152,7 +152,7 @@ selector { /* Fonts */ font-family: Arial; - font-family: "Courier New"; /* if name has spaaace it appears in single or double quotes */ + font-family: "Courier New"; /* if name has space it appears in single or double quotes */ font-family: "Courier New", Trebuchet, Arial, sans-serif; /* if first one was not found browser uses the second font, and so forth */ } @@ -230,7 +230,7 @@ Remember, the precedence is for each **property**, not for the entire block. ## Compatibility Most of the features in CSS2 (and gradually in CSS3) are compatible across -all browsers and devices. But it's always vital to have in mind the compatiblity +all browsers and devices. But it's always vital to have in mind the compatibility of what you use in CSS with your target browsers. [QuirksMode CSS](http://www.quirksmode.org/css/) is one of the best sources for this. -- cgit v1.2.3 From e1667cc836cc1b5f43404c0d54c02d38d9480ec8 Mon Sep 17 00:00:00 2001 From: awalGarg Date: Thu, 19 Feb 2015 00:15:12 +0530 Subject: corrected definition of ~ selector, added | [attr~='foo'] will not select , it will only select Also added definition for [attr|='pre'] style selector Refs: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors, http://jsfiddle.net/awalGarg/72k3ptsk/ --- css.html.markdown | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'css.html.markdown') 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: -
+
*/ /* 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 -- cgit v1.2.3