Supported CSS Selectors
The following table lists the CSS selectors that are supported in Oxygen XML Author:
| Expression | Name | CSS Level | Description / Example |
|---|---|---|---|
| * | Universal selector | CSS Level 2 | Matches any element |
| E | Type selector | CSS Level 2 | Matches any E element (i. e. an element with the local name
E) |
| E F | Descendant selector | CSS Level 2 | Matches any F element that is a descendant of an
E element. |
| E > F | Child selectors | CSS Level 2 | Matches any F element that is a child of an element
E. |
| E:lang(c) | Language pseudo-class | CSS Level 2 | Matches element of type E if it is in (human) language
c (the document language specifies how language is determined).
|
| E + F | Adjacent selector | CSS Level 2 | Matches any F element immediately preceded by a sibling
element E. |
| E ~ F | General sibling selector | CSS Level 3 | Matches any F element preceded by a sibling element
E. |
| E[foo] | Attribute selector | CSS Level 2 | Matches any E element with the "foo"
attribute set (whatever the value). |
| E[foo="warning"] | Attribute selector with value | CSS Level 2 | Matches any E element whose "foo" attribute
value is exactly equal to "warning". |
| E[foo~="warning"] | Attribute selector containing value | CSS Level 2 | Matches any E element whose "foo" attribute
value is a list of space-separated values, one of which is exactly equal to
"warning". |
| E[lang|="en"] | Attribute selector containing hyphen separated values | CSS Level 2 | Matches any E element whose "lang" attribute
has a hyphen-separated list of values beginning (from the left) with
"en". |
| E:before and E:after | Pseudo-elements | CSS Level 2 | The ':before' and ':after' pseudo-elements
can be used to insert generated content before or after an element's content.
|
| E:first-child | The first-child pseudo-class | CSS Level 2 | Matches element E when E is the first child
of its parent. |
| E:not(s) | Negation pseudo-class | CSS Level 2 |
An E element that does not match simple selector s. |
| E:has | Relational pseudo-class | CSS Level 4 |
The For more information, see :has Relational Pseudo-Class. |
| E:hover | The hover pseudo-class | CSS Level 2 |
The |
| E:focus | The focus pseudo-class | CSS Level 2 |
The |
| E:focus-within | The generalized input focus pseudo-class | CSS Level 4 |
The |
| E:marker | The marker pseudo-class | CSS Level 4 | The ::marker pseudo-element represents the automatically
generated marker box of a list item. |
| E#myid | The ID selector | CSS Level 2 |
Matches any E element with ID equal to "myid".
Important: Limitation:
In Oxygen XML Author the match is performed only taking into account the
attributes with the exact name: "id". |
| E[att^="val"] | Substring matching attribute selector | CSS Level 3 | An E element whose att attribute value begins exactly with the
string val. |
| E[att$="val"] | Substring matching attribute selector | CSS Level 3 | An E element whose att attribute value ends exactly with the
string val. |
| E[att*="val"] | Substring matching attribute selector | CSS Level 3 | An E element whose att attribute value contains the substring
val. |
| E:root | Root pseudo-class | CSS Level 3 | Matches the root element of the document. In HTML, the root element is always the HTML element. |
| E:empty | Empty pseudo-class | CSS Level 3 | An E element that has no text or child elements. |
| E:nth-child(n) | The nth-child pseudo-class | CSS Level 3 | An E element, the nth child of its parent. |
| E:nth-last-child(n) | The nth-last-child pseudo-class | CSS Level 3 |
An E element, the nth child of its parent, counting from the last one. |
| E:nth-of-type(n) | The nth-of-type pseudo-class | CSS Level 3 |
An E element, the nth sibling of its type. |
| E:nth-last-of-type(n) | The nth-last-of-type pseudo-class | CSS Level 3 |
An E element, the nth sibling of its type, counting from the last one. |
| E:last-child | The last-child pseudo-class | CSS Level 3 |
An E element, last child of its parent. |
| E:first-of-type | The first-of-type pseudo-class | CSS Level 3 |
An E element, first sibling of its type. |
| E:last-of-type | The last-of-type pseudo-class | CSS Level 3 |
An E element, last sibling of its type. |
| E:only-child | The only-child pseudo-class | CSS Level 3 |
An E element, only child of its parent. |
| E:only-of-type | The only-of-type pseudo-class | CSS Level 3 |
An E element, only sibling of its type. |
| ns|E | Element namespace selector | CSS Level 3 |
An element that has the local name E and the namespace given by the prefix
ns. The namespace prefix can be bound to a URI by the
at-rule:@namespace ns "http://some_namespace_uri";See
Namespace Selector. |
| E!>F | The subject selector | CSS Level 4 (experimental) |
An element that has the local name E and has a child F. See Subject Selector. |