Skip to content

Lint: fix CSS syntax and some antipatterns - #39685

Merged
estelle merged 1 commit into
mdn:mainfrom
Josh-Cena:fix-css-lint
May 27, 2025
Merged

estelle merged 1 commit into
mdn:mainfrom
Josh-Cena:fix-css-lint

Conversation

@Josh-Cena

Copy link
Copy Markdown
Member
  • Fix some obvious syntax errors
  • clip never supported rect without commas; remove that syntax
  • Removed some redundant property duplications
  • Removed other redeclarations for the purpose of browser compatibility, because the newer syntax is well-supported already
  • Rewrote the @media not description because it's incorrect

@Josh-Cena
Josh-Cena requested review from a team, estelle and sideshowbarker and removed request for a team May 26, 2025 12:58
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs Content:Learn Learning area docs (outside of one of the Learn:* subtags) Content:Accessibility Accessibility docs Content:Media Media docs size/m [PR only] 51-500 LoC changed labels May 26, 2025
@github-actions

Copy link
Copy Markdown
Contributor
Preview URLs (27 pages)
Flaws (10)

Note! 23 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Learn_web_development/Extensions/Forms/HTML_forms_in_legacy_browsers
Title: HTML forms in legacy browsers
Flaw count: 3

  • unknown:
    • No generic content config found
    • no blog root
    • no blog root

URL: /en-US/docs/Web/API/Web_Audio_API/Controlling_multiple_parameters_with_ConstantSourceNode
Title: Controlling multiple parameters with ConstantSourceNode
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/API/Web_Audio_API/Tools which is a redirect

URL: /en-US/docs/Web/API/WebRTC_API/Build_a_phone_with_peerjs/Setup
Title: Setup
Flaw count: 1

  • macros:
    • Can't resolve /en-US/docs/Web/API/RTCDtlsTransport/statechange_event

URL: /en-US/docs/Web/CSS/@supports
Title: @supports
Flaw count: 5

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/rule-list
    • Can't resolve /en-US/docs/Web/CSS/function-token
    • Can't resolve /en-US/docs/Web/CSS/any-value
    • Can't resolve /en-US/docs/Web/CSS/any-value
    • Can't resolve /en-US/docs/Web/CSS/declaration
External URLs (27)

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/React_todo_list_beginning
Title: Beginning our React ToDo app


URL: /en-US/docs/Learn_web_development/Extensions/Forms/How_to_build_custom_form_controls
Title: How to build custom form controls


URL: /en-US/docs/Web/CSS/-webkit-text-stroke
Title: -webkit-text-stroke


URL: /en-US/docs/Web/CSS/left
Title: left


URL: /en-US/docs/Web/Media/Guides/Audio_and_video_delivery/Adding_captions_and_subtitles_to_HTML5_video
Title: Adding captions and subtitles to HTML video

@Josh-Cena
Josh-Cena requested review from bsmth and removed request for a team May 26, 2025 13:03

@estelle estelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just one page needs fixin'.

Thanks!

outline: 4px dashed #6e1478;
color: hsl(0deg 100% 100%);
text-decoration: underline;
text-decoration-line: underline;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

here we have 3 long hands then the shorthand. Safari doesn't understand thickness in the shorthand, but this value doesn't include that property, so we can just use the shorthand and get ride of the note after this block

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also remove "along with the longhand component for browser compatibility" before
'We used the 3-digit {{cssxref("hex-color")}} #8f8, which is the equivalent of #88ff88.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@estelle Unfortunately the latest Safari still does not support this. Note that in the text-decoration BCD table, "text-decoration-color and text-decoration-style included in shorthand" for Safari says "Implemented with the vendor prefix: -webkit-". I've tried on Safari 18.5.

@bsmth
bsmth removed request for bsmth and sideshowbarker May 27, 2025 11:50
@estelle
estelle merged commit edb16c0 into mdn:main May 27, 2025
@Josh-Cena
Josh-Cena deleted the fix-css-lint branch May 28, 2025 01:59
zachernuk pushed a commit to zachernuk/content that referenced this pull request Jun 4, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Content:Accessibility Accessibility docs Content:CSS Cascading Style Sheets docs Content:Learn Learning area docs (outside of one of the Learn:* subtags) Content:Media Media docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants