Skip to content

Lint: add quotes for all url() arguments #40601

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

Merged
merged 1 commit into from
Aug 5, 2025
Merged

Conversation

Josh-Cena
Copy link
Member

After #40228, we are a lot more explicit on some CSS stylistic decisions. This PR adds double quotes to all url() functions, and changes @import url(...) to @import "...".

@Josh-Cena Josh-Cena requested review from a team as code owners August 3, 2025 06:27
@Josh-Cena Josh-Cena requested review from hamishwillee, chrisdavidmills, wbamberg, scottaohara and rebloor and removed request for a team August 3, 2025 06:27
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs Content:WebExt WebExtensions docs Content:WebAPI Web API docs Content:Learn Learning area docs Content:HTTP HTTP docs Content:Accessibility Accessibility docs Content:SVG SVG docs labels Aug 3, 2025
@Josh-Cena Josh-Cena requested review from dipikabh and bsmth and removed request for scottaohara and rebloor August 3, 2025 06:27
@github-actions github-actions bot added the size/l [PR only] 501-1000 LoC changed label Aug 3, 2025
Copy link
Contributor

github-actions bot commented Aug 3, 2025

Preview URLs (142 pages)
Flaws (149)

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

URL: /en-US/docs/Learn_web_development/Extensions/Performance/CSS
Title: CSS performance optimization
Flaw count: 2

  • broken_links:
    • /en-US/docs/Learn_web_development/Extensions/Performance/html is ill cased
    • /en-US/docs/Learn_web_development/Extensions/Performance/html is ill cased

URL: /en-US/docs/Web/CSS/-webkit-mask-box-image
Title: -webkit-mask-box-image
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/mask-image-source
    • Can't resolve /en-US/docs/Web/CSS/mask-image-offset

URL: /en-US/docs/Web/CSS/-webkit-mask-composite
Title: -webkit-mask-composite
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/composite-style

URL: /en-US/docs/Web/CSS/@counter-style/additive-symbols
Title: additive-symbols
Flaw count: 4

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect
    • 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/@counter-style/prefix
Title: prefix
Flaw count: 4

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect
    • 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/@counter-style/suffix
Title: suffix
Flaw count: 4

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect
    • 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/@font-face/font-display
Title: font-display
Flaw count: 1

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect

URL: /en-US/docs/Web/CSS/@font-face/src
Title: src
Flaw count: 5

  • broken_links:
    • /en-US/docs/Web/CSS/At-rule is a redirect
    • Can't resolve /en-US/docs/Web/CSS/font-src-list
    • 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/@font-palette-values
Title: @font-palette-values
Flaw count: 1

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

URL: /en-US/docs/Web/CSS/@font-palette-values/font-family
Title: font-family
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/@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/@import
Title: @import
Flaw count: 9

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/declaration
    • Can't resolve /en-US/docs/Web/CSS/media-query-list
    • 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
    • and 4 more flaws omitted

URL: /en-US/docs/Web/CSS/@namespace
Title: @namespace
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/@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

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

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/zero
    • 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/border-image-source
Title: border-image-source
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/clip-path
Title: clip-path
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/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

URL: /en-US/docs/Web/CSS/cross-fade
Title: cross-fade()
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/CSS_masking/Masking
Title: Introduction to CSS masking
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/CSS/conic-gradient which is a redirect

URL: /en-US/docs/Web/CSS/CSS_syntax/Error_handling
Title: CSS error handling
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/CSS/at-rule which is a redirect

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

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/url-set
    • 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/fill
Title: fill
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/font-palette
Title: font-palette
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/palette-identifier
    • Can't resolve /en-US/docs/Web/CSS/palette-identifier

URL: /en-US/docs/Web/CSS/font-palette/palette-mix
Title: palette-mix()
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/palette-identifier
    • Can't resolve /en-US/docs/Web/CSS/palette-mix()

URL: /en-US/docs/Web/CSS/image
Title: <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/marker
Title: marker
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/marker-end
Title: marker-end
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/marker-mid
Title: marker-mid
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/marker-start
Title: marker-start
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/mask
Title: mask
Flaw count: 5

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context is a redirect
    • 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/mask-border-source
Title: mask-border-source
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/mask-image
Title: mask-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/mix-blend-mode
Title: mix-blend-mode
Flaw count: 1

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context is a redirect

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

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context is a redirect
    • 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/offset-path
Title: offset-path
Flaw count: 4

  • broken_links:
    • /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context is a redirect
    • 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/shape-outside
Title: shape-outside
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/shape-box which is a redirect

URL: /en-US/docs/Web/CSS/stroke
Title: stroke
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/url_function
Title: url()
Flaw count: 2

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

URL: /en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/style-src
Title: Content-Security-Policy: style-src directive
Flaw count: 3

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

URL: /en-US/docs/Web/SVG/Reference/Element/a
Title: <a>
Flaw count: 5

  • macros:
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect

URL: /en-US/docs/Web/SVG/Reference/Element/feMorphology
Title: <feMorphology>
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/SVG/Reference/Element/discard which is a redirect

URL: /en-US/docs/Web/SVG/Reference/Element/marker
Title: <marker>
Flaw count: 5

  • macros:
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
    • Macro produces link /en-US/docs/Web/SVG/Element which is a redirect
External URLs (2)

URL: /en-US/docs/Learn_web_development/Core/Styling_basics/Backgrounds_and_borders
Title: Backgrounds and borders

(comment last updated: 2025-08-03 06:59:27)

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for fixing the syntax block 👍

Copy link
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.

LGTM, thanks a lot!

@dipikabh dipikabh merged commit 9944f7b into mdn:main Aug 5, 2025
8 checks passed
@Josh-Cena Josh-Cena deleted the url-quotes branch August 5, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs Content:HTTP HTTP docs Content:Learn Learning area docs Content:SVG SVG docs Content:WebAPI Web API docs Content:WebExt WebExtensions docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants