Commit 35a0fb09 authored by Benjamin Otte's avatar Benjamin Otte

css: Rewrite selectors

Previously we kept a Selector object for every "simple selector" (term
from CSS spec). Now we keep one for every match operation. So given the
selector
  ".a b:focus"
we will have 4 elements:
  - pseudoclass ":focus"
  - element "b"
  - match any desendant (the space)
  - class ".a"
Each of those is represented by a "selector class" which is basically
the collection of vfuncs for this selector.
parent eb013767
This diff is collapsed.
......@@ -38,7 +38,7 @@ a > b {
int-property: 42;
}
.b {
*.b {
int-property: 42;
}
......@@ -50,7 +50,7 @@ a > b {
int-property: 42;
}
:hover {
*:hover {
int-property: 42;
}
......@@ -150,7 +150,7 @@ a > :hover {
int-property: 42;
}
.b:hover {
:hover.b {
int-property: 42;
}
......@@ -174,7 +174,7 @@ a > :hover {
int-property: 42;
}
#b {
*#b {
int-property: 42;
}
......@@ -218,7 +218,7 @@ a > #b {
int-property: 42;
}
#b.a {
.a#b {
int-property: 42;
}
......@@ -230,7 +230,7 @@ a > #b {
int-property: 42;
}
#b:hover {
:hover#b {
int-property: 42;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment