Skip to content

Remove 'border' from list of properties that can be given a 'url()'#44671

Merged
chrisdavidmills merged 2 commits into
mdn:mainfrom
ferdnyc:patch-2
Jul 9, 2026
Merged

Remove 'border' from list of properties that can be given a 'url()'#44671
chrisdavidmills merged 2 commits into
mdn:mainfrom
ferdnyc:patch-2

Conversation

@ferdnyc

@ferdnyc ferdnyc commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Page: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/url_function

In the CSS url() documentation, remove border from a list of properties that can be given a url() as their value (or part thereof).

Motivation

The Backgrounds & Borders Module Level 3 spec explicitly prohibits border from accepting a url() argument. It is a shorthand for border-width, border-color, and border-style only, and is required to implicitly reset the corresponding border-image properties back to their initial value whenever it is used.

Additional details

Relevant section of the spec: CSS Backgrounds and Borders Module Level 3, § Border Shorthand Properties

Related issues and pull requests

The `border` shorthand is explicitly NOT able to take a `url()`.
It is a shorthand for `border-width`, `border-color`, and
`border-style` only. It can only (un-)set `border-image`
_implicitly_, and is in fact required to do so.
Any use of `border` resets the value of `border-image` back
to its initial value, by requirement of the spec.

Reference:
CSS Backgrounds and Borders Module Level 3
https://www.w3.org/TR/css-backgrounds-3/#border-shorthands
@ferdnyc ferdnyc requested a review from a team as a code owner July 8, 2026 19:57
@ferdnyc ferdnyc requested review from chrisdavidmills and removed request for a team July 8, 2026 19:57
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Flaws (2)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/Values/url_function
Title: url() CSS function
Flaw count: 2

  • macros:
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/url-modifier which doesn't resolve
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/url-token which doesn't resolve

(comment last updated: 2026-07-09 04:18:10)

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This makes total sense. Good catch, @ferdnyc, thanks for the update.

@chrisdavidmills chrisdavidmills merged commit 039b9d3 into mdn:main Jul 9, 2026
9 checks passed
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/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants