-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add Attribute Selector #46
base: master
Are you sure you want to change the base?
Conversation
readme.md
Outdated
[SELECTOR|SELECTOR_REF, <selector>], | ||
( | ||
[ATTRIBUTE_OPERATOR, <operator>], | ||
[SELECTOR, <string value>] | <compound string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you didn't cover this case
/* Links with "insensitive" anywhere in the URL,
regardless of capitalization */
a[href*="insensitive" i] {
color: cyan;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, true
Edit: Done
readme.md
Outdated
( | ||
[ATTRIBUTE_OPERATOR, <operator>], | ||
[SELECTOR, <string value>] | <compound string>, | ||
[SELECTOR, "i"|"I"]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure you want to express it as a selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just stick with lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some ideas how to express it:
- it could be a simple 1 as a number, without any markers
- it could be a universal marker CASEINSENSITIVE if we can use it in other places as well (need to dig to find out)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just add it as 0/1 to ATTRIBUTE_SELECTOR_START
Btw we can’t just add numbers to the ISTF array as that breaks strong typing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, sounds good
We can just add it as 0/1 to ATTRIBUTE_SELECTOR_START
readme.md
Outdated
|
||
``` | ||
[ATTRIBUTE_SELECTOR_START], | ||
[SELECTOR|SELECTOR_REF, <selector>], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should think of a separate marker for attribute name
@kof Made the changes we've discussed for the Attribute Selector nodes and structure. This is already implemented and from looking at it in a bigger context / file, it seems very explicit 👍 |
const ATTRIBUTE_OPERATOR = 31 | ||
const ATTRIBUTE_VALUE = 32 | ||
const ATTRIBUTE_VALUE_REF = 33 | ||
const CONDITION_REF = 34 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing examples for this one?
const ATTRIBUTE_NAME = 29 | ||
const ATTRIBUTE_NAME_REF = 30 | ||
const ATTRIBUTE_OPERATOR = 31 | ||
const ATTRIBUTE_VALUE = 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use VALUE instead?
AFAIK, we are waiting with merging this for more learnings from the parser you are implementing @kitten, right? |
No description provided.