Skip to content

Fix incorect default values for background CSS shorthand property page.#43639

Open
vituluss wants to merge 1 commit intomdn:mainfrom
vituluss:patch-1
Open

Fix incorect default values for background CSS shorthand property page.#43639
vituluss wants to merge 1 commit intomdn:mainfrom
vituluss:patch-1

Conversation

@vituluss
Copy link
Copy Markdown

@vituluss vituluss commented Apr 1, 2026

Fixed incorrect default values.

The default values for background-clip and background-origin were the wrong way around.

Description

I swapped the written default values for background-clip and background-origin the correct way around as per the specification. The CSS spec says that background resets unspecified properties to initial.

Motivation

MDN docs should have correct information.

Additional details

This is what the CSS spec says:

Given a valid declaration, for each layer the shorthand first sets the corresponding value of each of background-image, background-position, background-size, background-repeat, background-origin, background-clip and background-attachment to that property’s initial value, then assigns any explicit values specified for this layer in the declaration

Fixed incorrect default values.
@vituluss vituluss requested a review from a team as a code owner April 1, 2026 01:29
@vituluss vituluss requested review from hamishwillee and removed request for a team April 1, 2026 01:29
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Apr 1, 2026
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.

2 participants