CSS Selectors

The following table summarizes the selectors supported by Oxygen PDF Chemistry:

Pattern Meaning Described in section CSS level
* any element Universal selector 2
E an element of type E Type element selector 1
E[foo] an E element with the "foo" attribute set Attribute selectors 2
E[foo="bar"] an E element whose "foo" attribute value is exactly equal to "bar" Attribute selectors 2
E[foo~="bar"] an E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "bar" Attribute selectors 2
E[foo^="bar"] an E element whose "foo" attribute value begins exactly with the string "bar" Attribute selectors 3
E[foo$="bar"] an E element whose "foo" attribute value ends exactly with the string "bar" Attribute selectors 3
E[foo*="bar"] an E element whose "foo" atrribute value contains the substring "bar" Attribute selectors 3
E[lang|="en"] an E element whose "lang" attribute has a hyphen-separated list of values beginning (from the left) with "en" Attribute selectors 2
E:root an E element, root of the document Structural pseudo-classes 3
E:first-child an E element, first child of its parent Structural pseudo-classes 2
E:last-child an E element, last child of its parent Structural pseudo-classes 3
E:first-of-type an E element, first sibling of its type Structural pseudo-classes 3
E:last-of-type an E element, last sibling of its type Structural pseudo-classes 3
E:only-of-type an E element, only sibling of its type Structural pseudo-classes 3
E:only-child an E element, only child of its parent Structural pseudo-classes 3
E:nth-child(n) an E element, the n-th child of its parent Structural pseudo-classes 3
E:nth-of-type(n) an E element, the n-th sibling of its type Structural pseudo-classes 3
E:empty an E element that has no children (including text nodes) Structural pseudo-classes 3
E:lang(c) an element of type E in (human) language c (the document language specifies how language is determined) The :lang() pseudo-class 2
E:has(F) an E element with the condition F applying to one of its children. Similar to the subject selector described in:The subject element pseudo-class Extension. 3
E:first-letter the first formatted letter of an E element The :first-letter pseudo element 1
E:before generated content before an E element The :before pseudo element 2
E:after(n) generated content after an E element. Setting a value of 1 is creates a normal :before. A higher value means the generated content is farther to the element. Extension  
E:after generated content after an E element The :after pseudo element 2
E:before(n) generated content before an E element. Setting a value of 1 is creates a normal :before. A higher value means the generated content is farther to the element. Extension  
E:marker generated by list items to represent the item’s marker (the bullet or number identifying each item). E is supposed to have display list-item Marker pseudo element 3
E#myid an E element, its ID being equal to "myid". ID selectors 1
E F an F element descendant of an E element Descendant combinator 1
E > F an F element child of an element E Child combinator 2
E + F an F element immediately preceded by an element E Direct adjacent combinator 2
E ~ F an F element preceded by an element E Indirect adjacent combinator 3