-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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(src): Fix invalid example @font-face def #34655
Conversation
A `format();` argument was accidentally doubled when applying suggested changes during review of mdn#20691.
Preview URLs (comment last updated: 2024-07-06 02:37:56) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@Josh-Cena Oh, cool, I see you figured out the same thing I eventually did — that putting the inline trailing CSS comments before the comma keeps Prettier from making a complete mess of them. 👍 (I ended up on quite the journey of discovery into Prettier's handling of comment placement, yesterday.) |
Yeah, it's always a fight😅 |
FYI you can also put ```css-nolint |
Yeah but here it's an example and there's no reason to not format it, other than needing time to figure out how to make it look good. |
Agreed. The above is mainly useful when you end up in one of those situations where prettier has formatted most things correctly, but then does something weird to a couple of lines and you want it to chill out ;-) |
Description
Remove a
format();
argument which was accidentally doubled while applying suggested changes during review of #20691. The CSS example as currently shown in the documentation is invalid, havingformat("opentype");
on its own in a@font-face
definition (not as an argument tosrc:
).Motivation
Ensure that example CSS in the repo is valid and works as intended.
Additional details
This suggested change overlooked that
format("opentype");
was present on a separate line immediately below the suggestion, and accidentally duplicated it when applied.Related issues and pull requests