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.selectors.target-text - now supported in Safari #23692

Closed
Neptune919 opened this issue Jul 8, 2024 · 5 comments
Closed

css.selectors.target-text - now supported in Safari #23692

Neptune919 opened this issue Jul 8, 2024 · 5 comments
Labels
data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS

Comments

@Neptune919
Copy link

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

Safari was marked as not supporting target-text.

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

Safari listed as supporting target-text.

Did you test this? If so, how?

Yes, I saw it in action using a URL containing a Text Fragment.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No response

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/::target-text

MDN metadata

MDN page report details
  • Query: css.selectors.target-text
  • Report started: 2024-07-08T07:17:52.629Z
@queengooborg
Copy link
Collaborator

queengooborg commented Jul 8, 2024

Safari supports text fragments, but it does not support the ::target-text selector to style them yet. Here's a side-by-side comparison of Chrome (left) and Safari (right), using the demo linked towards the bottom of the MDN page:

Screenshot 2024-07-08 at 00 44 10

@queengooborg queengooborg closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
@queengooborg queengooborg added the data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label Jul 8, 2024
@Neptune919
Copy link
Author

That’s not true. The only difference in the automatically generated screenshot example is the color of the highlighting.

@queengooborg
Copy link
Collaborator

Uh...yes, that's exactly what I'm trying to show. The color of the highlighting (and the text color) is exactly what shows if ::target-text is supported. The example page has the following CSS:

::target-text {
  background-color: rebeccapurple;
  color: white;
}

We can see that in Chrome (left), the background color is correctly set to rebeccapurple, but it is not in Safari (right).

@Neptune919
Copy link
Author

Will anyone see and respond to my latest comment, now that it has been automatically closed?

@Neptune919
Copy link
Author

Oh, now I see. Sorry for my misunderstanding. I was unaware of the color specification. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS
Projects
None yet
Development

No branches or pull requests

2 participants