Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex for selector kind #2

Open
12 of 44 tasks
GGAlanSmithee opened this issue Oct 12, 2015 · 3 comments
Open
12 of 44 tasks

Regex for selector kind #2

GGAlanSmithee opened this issue Oct 12, 2015 · 3 comments
Assignees

Comments

@GGAlanSmithee
Copy link
Owner

Implement check for kind of selector

Regex introduction

Selector types

Regexr

  • * Universal selector
  • E Type selector
  • .E Class selector
  • #E Id selector
  • E[foo] Attribute selectors
  • E[foo="bar"] Attribute selectors
  • E[foo~="bar"] Attribute selectors
  • E[foo^="bar"] Attribute selectors
  • E[foo$="bar"] Attribute selectors
  • E[foo*="bar"] Attribute selectors
  • E[foo|="en"] Attribute selectors
  • E:root Structural pseudo-classes
  • E:nth-child(n) Structural pseudo-classes
  • E:nth-last-child(n) Structural pseudo-classes
  • E:nth-of-type(n) Structural pseudo-classes
  • E:nth-last-of-type(n) Structural pseudo-classes
  • E:first-child Structural pseudo-classes
  • E:last-child Structural pseudo-classes
  • E:first-of-type Structural pseudo-classes
  • E:last-of-type Structural pseudo-classes
  • E:only-child Structural pseudo-classes
  • E:only-of-type Structural pseudo-classes
  • E:empty Structural pseudo-classes
  • E:link The link pseudo-classes
  • E:visited
  • E:active The user action pseudo-classes
  • E:hover
  • E:focus
  • E:target The target pseudo-class
  • E:lang(fr) The :lang() pseudo-class
  • E:enabled The UI element states pseudo-classes
  • E:disabled
  • E:checked The UI element states pseudo-classes
  • E::first-line The ::first-line pseudo-element
  • E::first-letter The ::first-letter pseudo-element
  • E::before The ::before pseudo-element
  • E::after The ::after pseudo-element
  • E.warning Class selectors
  • E#myid ID selectors
  • E:not(s) Negation pseudo-class
  • E F Descendant combinator
  • E > F Child combinator
  • E + F Adjacent sibling combinator
  • E ~ F General sibling combinator
@GGAlanSmithee GGAlanSmithee mentioned this issue Oct 13, 2015
@GGAlanSmithee
Copy link
Owner Author

Different types of selectors: http://www.w3.org/TR/CSS21/selector.html%23id-selectors

@GGAlanSmithee
Copy link
Owner Author

For selectors, we need to take into account namespaces

GGAlanSmithee added a commit that referenced this issue Oct 20, 2015
…ng main type of selector and then checking subtypes #2
GGAlanSmithee added a commit that referenced this issue Oct 20, 2015
@GGAlanSmithee GGAlanSmithee self-assigned this Oct 22, 2015
GGAlanSmithee added a commit that referenced this issue Oct 22, 2015
…cture to add rest of attribute psuedo selectors #2
GGAlanSmithee added a commit that referenced this issue Oct 31, 2015
@GGAlanSmithee
Copy link
Owner Author

As it turns out, this functionality will not be crusial for the objectifying of a CSS file.
I will keep this in this repo though, since it will come in handy later when re-applying (inlining) the CSS rules (CSS object) to a DOM structure.

GGAlanSmithee added a commit that referenced this issue Nov 4, 2015
…ition to regular type selectors and updates tests #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant