Fetching latest commit…
Cannot retrieve the latest commit at this time
|Failed to load latest commit information.|
1. CSS 1.1. Selector Anatomy There are some variations for the selector identifier. Let's ignore a selector identifier can be found nested or comma separated for now. As such, the possible variations, as examples, are found below. 1.1.1. Single Selector Idenfitier Variations 22.214.171.124. h1 (a simple tag) 126.96.36.199. .test (a simple class) 188.8.131.52. #unique (a simple id) 184.108.40.206. * (any element) 220.127.116.11. :link (alone pseudo element or class) 18.104.22.168. h1.test (tag plus one single class) 22.214.171.124. h1#unique (tag plus a unique id) 126.96.36.199. h1#unique.test (tag plus a unique id and a single class) 188.8.131.52. h1#unique.test.test2 (tag plus a unique id and two or more classes) 184.108.40.206. h1#unique.test.test2:first-line (tag plus a unique id, classes and one or more pseudo-elements) 220.127.116.11. h1[attr1][attr2][attrN] (tag with one or more attributes) 18.104.22.168. *[attr1] (any element with specific attributes) There a plenty of possible combinations, but these ones above are enough to give a rough idea of what I want to illustrate. So, summing everything up, there are some important pieces there: * tag (only one per single selector identifier - SSI) * classes (one or more classes per SSI) * ID (only one per SSI) * pseudo-classes or pseudo-elements * the special any element matcher * that acts like a tag * attributes (can appear one or more times per SSI) So basing on all these premises it'll be created regular expression patterns to define each one of these pieces.