Skip to content

Lint: always use long-form hex color (3)#40681

Merged
dipikabh merged 2 commits intomdn:mainfrom
Josh-Cena:hex-length-3
Aug 13, 2025
Merged

Lint: always use long-form hex color (3)#40681
dipikabh merged 2 commits intomdn:mainfrom
Josh-Cena:hex-length-3

Conversation

@Josh-Cena
Copy link
Copy Markdown
Member

After #40228, we are a lot more explicit on some CSS stylistic decisions. In particular, we now have systematic rules surrounding the preferred color notations. In this batch of PRs, I'm converting all short hex to long hex. The benefit is: readers can more easily understand the syntax; there's one less syntactic variability; if I want to grep all occurrences of one hex color, I can do that more easily without #aaa also matching #aaaddd.

@Josh-Cena Josh-Cena requested a review from a team as a code owner August 9, 2025 05:22
@Josh-Cena Josh-Cena requested review from dipikabh and removed request for a team August 9, 2025 05:22
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Aug 9, 2025
@Josh-Cena Josh-Cena requested review from bsmth and estelle August 9, 2025 05:22
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Aug 9, 2025
Comment thread files/en-us/web/css/background-repeat/index.md Outdated
Comment thread files/en-us/web/css/border-image/index.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2025

Preview URLs (100 pages)
Flaws (40)

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

URL: /en-US/docs/Web/CSS/@font-palette-values/override-colors
Title: override-colors
Flaw count: 3

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect
  • macros:
    • Macro produces link /en-US/docs/Web/CSS/@font-palette-values/ which is a redirect
    • Macro produces link /en-US/docs/Web/CSS/font-palette/ which is a redirect

URL: /en-US/docs/Web/CSS/@position-try
Title: @position-try
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/declaration-list

URL: /en-US/docs/Web/CSS/@scope
Title: @scope
Flaw count: 3

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/scope-start
    • Can't resolve /en-US/docs/Web/CSS/scope-end
    • Can't resolve /en-US/docs/Web/CSS/block-contents

URL: /en-US/docs/Web/CSS/attr
Title: attr()
Flaw count: 4

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/declaration-value
    • Can't resolve /en-US/docs/Web/CSS/ident-token
    • Can't resolve /en-US/docs/Web/CSS/ident-token
    • Can't resolve /en-US/docs/Web/CSS/attr-unit

URL: /en-US/docs/Web/CSS/background
Title: background
Flaw count: 4

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/url-modifier
    • Can't resolve /en-US/docs/Web/CSS/url-token
    • Can't resolve /en-US/docs/Web/CSS/url-modifier
  • macros:
    • Macro produces link /en-US/docs/Web/CSS/url which is a redirect

URL: /en-US/docs/Web/CSS/background-image
Title: background-image
Flaw count: 4

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/url-modifier
    • Can't resolve /en-US/docs/Web/CSS/url-token
    • Can't resolve /en-US/docs/Web/CSS/url-modifier
  • macros:
    • Macro produces link /en-US/docs/Web/CSS/url which is a redirect

URL: /en-US/docs/Web/CSS/border-image
Title: border-image
Flaw count: 3

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/url-modifier
    • Can't resolve /en-US/docs/Web/CSS/url-token
    • Can't resolve /en-US/docs/Web/CSS/url-modifier

URL: /en-US/docs/Web/CSS/box-shadow
Title: box-shadow
Flaw count: 5

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/box-shadow-color
    • Can't resolve /en-US/docs/Web/CSS/box-shadow-offset
    • Can't resolve /en-US/docs/Web/CSS/box-shadow-blur
    • Can't resolve /en-US/docs/Web/CSS/box-shadow-spread
    • Can't resolve /en-US/docs/Web/CSS/box-shadow-position

URL: /en-US/docs/Web/CSS/calc-size
Title: calc-size()
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/size-keyword
    • Can't resolve /en-US/docs/Web/CSS/calc-size()

URL: /en-US/docs/Web/CSS/content
Title: content
Flaw count: 11

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/declaration-value
    • Can't resolve /en-US/docs/Web/CSS/counter-name
    • Can't resolve /en-US/docs/Web/CSS/counter-name
    • Can't resolve /en-US/docs/Web/CSS/ident-token
    • Can't resolve /en-US/docs/Web/CSS/ident-token
    • and 6 more flaws omitted

(comment last updated: 2025-08-09 05:26:56)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Looks good, thank you

@dipikabh dipikabh merged commit e82803b into mdn:main Aug 13, 2025
8 checks passed
@Josh-Cena Josh-Cena deleted the hex-length-3 branch August 13, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants