[go: nahoru, domu]

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

[css-pseudo-4] Do we need a specialized :target pseudoclass for scroll-to-element? #6825

Open
flackr opened this issue Nov 23, 2021 · 0 comments
Labels

Comments

@flackr
Copy link
Contributor
flackr commented Nov 23, 2021

In the scroll to selector extension to the scroll-to-text-fragment explainer we propose adding a fragment directive which selects elements. When we scroll to these, as with scrolling to text, there is a desire to have a default style which calls attention to the element. In this particular case an outline is the current leading proposal.

As with scroll-to-text issue #5522, this style should be customizable by the developer. Semantically, the :target pseudoclass perfectly describes this target, however adding a default UA style to outline targeted elements would affect the style of existing anchor fragment navigation elements in an undesirable way.

This leads to the question in the issue, do we need a new pseudoclass for these targets? Or, should we use :target, and if so is there a way to ensure the default UA style for fragment directive targets is not applied on anchor navigation? With :target-text we had no issues as this was an entirely new concept and so would not have existing styles or navigation cases which activated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants