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

Fix text-underline-offset example in Safari #2601

Merged

Conversation

njesenberger
Copy link
Contributor

Description

Replace text-decoration shorthand with text-decoration-line and text-decoration-color in text-underline-offset.css

-  text-decoration: underline #ff0000;
+  text-decoration-line: underline;
+  text-decoration-color: #ff0000;

Motivation

text-underline-offset example currently appears broken in Safari because of it not supporting text-decoration shorthand without -webkit- prefix

Additional details

Alternative could be to add -webkit- prefixed version of text-decoration property

+  -webkit-text-decoration: underline #ff0000;
text-decoration: underline #ff0000;

However a solution that doesn’t require a vendor prefix seems preferable.

@njesenberger njesenberger requested a review from a team as a code owner August 25, 2023 09:43
@njesenberger njesenberger requested review from chrisdavidmills and removed request for a team August 25, 2023 09:43
@github-actions
Copy link

It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed — the example indeed does not work in Safari as-is, and your change fixes that. I also agree that not using vendor prefixes where possible is a good policy.

Thanks a lot for the contribution @njesenberger, much appreciated!

@chrisdavidmills chrisdavidmills merged commit ad949e0 into mdn:main Aug 29, 2023
5 checks passed
@github-actions
Copy link

Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.

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