File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace Sabberworm \CSS \Property \Selector ;
66
7+ /**
8+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Selectors/Selector_structure
9+ *
10+ * A complex selector is a sequence of one or more simple and/or compound selectors that are separated by combinators,
11+ * including the white space descendant combinator.
12+ *
13+ * This is essentially a 'selector', as a 'selector list' is a list of comma-separated selectors.
14+ *
15+ * A compound selector is a superset that includes a simple selector:
16+ * - `li` is a simple selector (but can be treated as a compound selector);
17+ * - `li:last-child` is a compound selector;
18+ * - `ul li:last-child` is a complex selector as it has a combinator (the whitespace descendent combinator).
19+ *
20+ * A (complex) selector can be decomposed thus:
21+ * selector = compound-selector [combinator, compound-selector]*
22+ *
23+ * It's a list of alternating types.
24+ *
25+ * This interface covers both types, so they can be put into an array of the interface type.
26+ */
727interface SelectorComponent
828{
929 /**
1030 * @return non-empty-string
1131 */
12- public function getStringValue (): string ;
32+ public function getValue (): string ;
1333
1434 /**
1535 * @param non-empty-string $value
1636 */
17- public function setStringValue (string $ value ): void ;
37+ public function setValue (string $ value ): void ;
1838
1939 /**
2040 * @return int<0, max>
You can’t perform that action at this time.
0 commit comments