Skip to content

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

Merged
hamishwillee merged 1 commit intomdn:mainfrom
vituluss:patch-1
Apr 6, 2026
Merged

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

Conversation

@vituluss
Copy link
Copy Markdown
Contributor

@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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Preview URLs (1 page)

Flaws (4)

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

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

  • broken_links:
    • Link /en-US/docs/Web/CSS/Reference/Values/url doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/url doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/hash-token doesn't resolve
  • macros:
    • Macro cssinfo produces link /en-US/docs/Web/CSS/url which is a redirect

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Good catch @vituluss ! Congratulations on landing your first fix on MDN.

@hamishwillee hamishwillee merged commit 8e7f97c into mdn:main Apr 6, 2026
8 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