-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
[feature request] Add config option to include structural/semantic elements #66
Comments
I guess a similar option to always include an ancestor which has an id might also be worthwhile from a 'meaningful' point of view. |
I think it’s doable |
How about a separate entry point which may call So recursively do
And then chain together multiple calls to ? I can code this up unless you've an easier way of achieving it in the current .parentNode walk. Probably should be separate config options for |
We can just give different penalties depending on if it is a semantic tag or not. |
I still haven't wrapped my head around the penalty system ... does it completely take precedence over length-of-string? |
Yes. As the goal not only short, but robust. |
I'm not sure if the penalties alone will suffice; I'm thinking of this proposal as being a lot more verbose, so that it would have to look right back in the hierarchy to find those significant tag names. |
So I'm not sure if this is out of scope for this project.
I'm not so much interested as the shortest selector, as the most meaningful one.
From that point of view, any of the following tags are interesting:
https://www.w3schools.com/html/html5_semantic_elements.asp
I'd like those to be always included in the selector if they are present in the ancestor list.
I guess these would have to be qualified if they are not unique, so
article:nth-of-type(2)
.Does this request make any sense or is it a different project?
The text was updated successfully, but these errors were encountered: