Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
expirmental stuffs about CSS
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
utils
README

README

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

      1.1.1.1. h1 (a simple tag)
      1.1.1.2. .test (a simple class)
      1.1.1.3. #unique (a simple id)
      1.1.1.4. * (any element)
      1.1.1.5. :link (alone pseudo element or class)
      1.1.1.6. h1.test (tag plus one single class)
      1.1.1.7. h1#unique (tag plus a unique id)
      1.1.1.8. h1#unique.test (tag plus a unique id and a single class)
      1.1.1.9. h1#unique.test.test2 (tag plus a unique id and two or more classes)
      1.1.1.10. h1#unique.test.test2:first-line (tag plus a unique id, classes and one or more pseudo-elements)
      1.1.1.11. h1[attr1][attr2][attrN] (tag with one or more attributes)
      1.1.1.12. *[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. 
Something went wrong with that request. Please try again.