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

Add Attribute Selector #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add Attribute Selector #46

wants to merge 4 commits into from

Conversation

kitten
Copy link
Member

@kitten kitten commented Nov 20, 2017

No description provided.

readme.md Outdated
[SELECTOR|SELECTOR_REF, <selector>],
(
[ATTRIBUTE_OPERATOR, <operator>],
[SELECTOR, <string value>] | <compound string>
Copy link
Member

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;
}

Copy link
Member Author

@kitten kitten Nov 20, 2017

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"]?
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@kof kof Nov 20, 2017

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:

  1. it could be a simple 1 as a number, without any markers
  2. it could be a universal marker CASEINSENSITIVE if we can use it in other places as well (need to dig to find out)

Copy link
Member Author

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

Copy link
Member

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>],
Copy link
Member

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

@kitten
Copy link
Member Author

kitten commented Jan 3, 2018

@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
Copy link
Member

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
Copy link
Member

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?

@kof
Copy link
Member

kof commented Mar 12, 2018

AFAIK, we are waiting with merging this for more learnings from the parser you are implementing @kitten, right?

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

Successfully merging this pull request may close these issues.

2 participants