summaryrefslogtreecommitdiff
path: root/pocketCSS.md
diff options
context:
space:
mode:
Diffstat (limited to 'pocketCSS.md')
-rw-r--r--pocketCSS.md106
1 files changed, 53 insertions, 53 deletions
diff --git a/pocketCSS.md b/pocketCSS.md
index 14ea67c..527feb0 100644
--- a/pocketCSS.md
+++ b/pocketCSS.md
@@ -11,20 +11,20 @@
## Simple selectors
-<p class="micro">assume throughout that <code>E</code> and <code>F</code> are elements, they can have attribute <code>foo</code> e.g. <code style="white-space: nowrap">&lt;e foo="bar"&gt;</code> you can replace these with any elements or attributes.</p>
+<p class="micro">assume throughout that `E` and `F` are elements, they can have attribute `foo` e.g. <code style="white-space: nowrap">&lt;e foo="bar"&gt;</code> you can replace these with any elements or attributes.</p>
<p class="micro">In HTML, elements in CSS can be uppercase like these examples. In XHTML, elements must be lower case. Classes and IDs are <strong>always</strong> case sensitive</p>
<span class="micro"><strong>universal selector</strong>, match any element</span>
-<code>*</code>
+`*`
<span class="micro"><strong>type</strong> (or element) selector</span>
-<code>E</code>
+`E`
-<span class="micro"><strong>ID selector</strong> an E element with ID equal to "myid", e.g. <code>&lt;e id="myid"&gt;</code></span>
-<code>E#myid</code>
+<span class="micro"><strong>ID selector</strong> an E element with ID equal to "myid", e.g. `&lt;e id="myid"&gt;`</span>
+`E#myid`
-<span class="micro"><strong>class selector</strong> an E element whose class is "myclass", e.g. <code>&lt;e class="myclass"&gt;</code></span>
-<code>E.myclass</code>
+<span class="micro"><strong>class selector</strong> an E element whose class is "myclass", e.g. `&lt;e class="myclass"&gt;`</span>
+`E.myclass`
---
@@ -33,19 +33,19 @@
## Combinators <abbr class="amp" title="and">&amp;</abbr> negation
<span class="micro"><strong>descendant combinator</strong> to style an F element, which is a descendant of an E element</span>
-<code>E F</code>
+`E F`
<span class="micro"><strong>child combinator</strong> an F element which is the direct child of an E element</span>
-<code>E > F</code>
+`E > F`
<span class="micro"><strong>adjacent sibling combinator</strong> an F element that is immediately preceded by an E element</span>
-<code>E + F</code>
+`E + F`
<span class="micro"><strong>general sibling combinator</strong> an F element preceded at some point by an E element</span>
-<code>E ~ F</code>
+`E ~ F`
-<span class="micro"><strong>negation pseudo-class</strong> an E element that does not match simple selector <code>s</code></span>
-<code>E:not(s)</code>
+<span class="micro"><strong>negation pseudo-class</strong> an E element that does not match simple selector `s`</span>
+`E:not(s)`
---
@@ -54,25 +54,25 @@
## Attribute selectors
<span class="micro">element E with a "foo" attribute</span>
-<code>E[foo]</code>
+`E[foo]`
-<span class="micro">E&#8217;s attribute <code>foo</code>, value exactly equal to <code>bar</code></span>
-<code>E[foo="bar"]</code>
+<span class="micro">E&#8217;s attribute `foo`, value exactly equal to `bar`</span>
+`E[foo="bar"]`
-<span class="micro">E&#8217;s attribute <code>foo</code>, value is whitespace-separated values, one of which is exactly "bar"</span>
-<code>E[foo~="bar"]</code>
+<span class="micro">E&#8217;s attribute `foo`, value is whitespace-separated values, one of which is exactly "bar"</span>
+`E[foo~="bar"]`
-<span class="micro">E&#8217;s attribute <code>foo</code>, value begins exactly "bar"</span>
-<code>E[foo^="bar"]</code>
+<span class="micro">E&#8217;s attribute `foo`, value begins exactly "bar"</span>
+`E[foo^="bar"]`
-<span class="micro">E&#8217;s attribute <code>foo</code>, value ends exactly "bar"</span>
-<code>E[foo$="bar"]</code>
+<span class="micro">E&#8217;s attribute `foo`, value ends exactly "bar"</span>
+`E[foo$="bar"]`
-<span class="micro">E&#8217;s attribute <code>foo</code>, value contains substring "bar"</span>
-<code>E[foo*="bar"]</code>
+<span class="micro">E&#8217;s attribute `foo`, value contains substring "bar"</span>
+`E[foo*="bar"]`
-<span class="micro">E&#8217;s attribute <code>foo</code> has a hyphen-separated list of values beginning (from the left) with "en"</span>
-<code>E[foo|="en"]</code>
+<span class="micro">E&#8217;s attribute `foo` has a hyphen-separated list of values beginning (from the left) with "en"</span>
+`E[foo|="en"]`
---
@@ -80,22 +80,22 @@
## Structural pseudo-classes
-<p class="micro"><code>n</code> can be replaced with an expression in all following cases <code>n</code> can be (odd), (even) or expressions such as (3n + 1)</span></p>
+<p class="micro">`n` can be replaced with an expression in all following cases `n` can be (odd), (even) or expressions such as (3n + 1)</span></p>
<span class="micro">an E element, the n-th child of its parent</span>
-<code>E:nth-child(n)</code>
+`E:nth-child(n)`
<span class="micro">an E element, the n-th child of its parent, counting from the last one</span>
-<code>E:nth-last-child(n)</code>
+`E:nth-last-child(n)`
<span class="micro">an E element, the n-th sibling of its type</span>
-<code>E:nth-of-type(n)</code>
+`E:nth-of-type(n)`
<span class="micro">an E element, the n-th sibling of its type, counting from the last one</span>
-<code>E:nth-last-of-type(n)</code>
+`E:nth-last-of-type(n)`
<span class="micro">an E element that is the document root, i.e. html</span>
-<code>E:root</code>
+`E:root`
---
@@ -104,25 +104,25 @@
## Structural pseudo-classes
<span class="micro">an E element, first child of its parent</span>
-<code>E:first-child</code>
+`E:first-child`
<span class="micro">an E element, first sibling of its type</span>
-<code>E:first-of-type</code>
+`E:first-of-type`
<span class="micro">an E element, last child of its parent</span>
-<code>E:last-child </code>
+`E:last-child `
<span class="micro">an E element, last sibling of its type</span>
-<code>E:last-of-type</code>
+`E:last-of-type`
<span class="micro">an E element, only child of its parent</span>
-<code>E:only-child</code>
+`E:only-child`
<span class="micro">an E element, only sibling of its type</span>
-<code>E:only-of-type</code>
+`E:only-of-type`
<span class="micro">an E element that has no children (including text nodes)</span>
-<code>E:empty</code>
+`E:empty`
---
@@ -131,25 +131,25 @@
## Pseudo-classes
<span class="micro">matches a link E when E is a link and not visited, hovered over focused on or active</span>
-<code>E:link</code>
+`E:link`
<span class="micro">the href target of the link E has been visited</span>
-<code>E:visited</code>
+`E:visited`
<span class="micro">the link E has been activated</span>
-<code>E:active</code>
+`E:active`
<span class="micro">any element E when hovered over with a mouse</span>
-<code>E:hover</code>
+`E:hover`
<span class="micro">the link or form control E when tabbed to with a keyboard</span>
-<code>E:focus</code>
+`E:focus`
<span class="micro">element E is the fragment in the referring URI</span>
-<code>E:target</code>
+`E:target`
<span class="micro">an element of type E in language "fr"</span>
-<code>E:lang(fr)</code>
+`E:lang(fr)`
---
@@ -158,24 +158,24 @@
## Forms <abbr class="amp" title="and">&amp;</abbr> <span style="white-space: nowrap">Pseudo-elements</span>
<span class="micro">a user interface element E which is enabled</span>
-<code>E:enabled</code>
+`E:enabled`
<span class="micro">a user interface element E which is disabled </span>
-<code>E:disabled</code>
+`E:disabled`
<span class="micro">a user interface element E which is checked</span>
-<code>E:checked</code>
+`E:checked`
<span class="micro">the first formatted line of an E element</span>
-<code>E::first-line</code>
+`E::first-line`
<span class="micro">the first formatted letter of an E element</span>
-<code>E::first-letter</code>
+`E::first-letter`
<span class="micro">generated content before an E element</span>
-<code>E::before</code>
+`E::before`
<span class="micro">generated content after an E element</span>
-<code>E::after</code>
+`E::after`
<p class="micro" style="text-align: right; border-top: 1px solid #E0E0E0; margin-top: 3em"><span class="micro">http://www.w3.org/TR/css3-selectors/</span></p>