Remove 'border' from list of properties that can be given a 'url()'#44671
Merged
Conversation
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
Contributor
|
Preview URLs (1 page) Flaws (2) Found an unexpected or unresolvable flaw? Please report it here. URL:
(comment last updated: 2026-07-09 04:18:10) |
chrisdavidmills
approved these changes
Jul 9, 2026
chrisdavidmills
left a comment
Contributor
There was a problem hiding this comment.
This makes total sense. Good catch, @ferdnyc, thanks for the update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Page: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/url_function
In the CSS
url()documentation, removeborderfrom a list of properties that can be given aurl()as their value (or part thereof).Motivation
The Backgrounds & Borders Module Level 3 spec explicitly prohibits
borderfrom accepting aurl()argument. It is a shorthand forborder-width,border-color, andborder-styleonly, and is required to implicitly reset the correspondingborder-imageproperties 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