Skip to content

[css-values-3] Incorrect explanation in 8.1.3, example 22...? #271

@impressivewebs

Description

@impressivewebs

I may be misunderstanding this so I apologize in advance. Here is the section:

https://drafts.csswg.org/css-values/#calc-computed-value

In there you have the "Example 22" box, which says, below the code:

Due to this, background-position preserves the percentage in a calc() rather than resolving it directly into a length, so that an expression like background-position: left calc(50% + 20px) properly centers the background and then shifts it 20px to the right, rather than placing its left edge 20px off of center.

However, a background-position set to "left calc(50% + 20px)" would center the image, then shift it 20px "down", not "to the right". The second value is the vertical offset, correct? Thus, it should read:

...properly centers the background and then shifts it 20px to down, rather than placing its top edge 20px off of center.

If there's something I'm totally misunderstanding here, forgive me for wasting anyone's time. Thanks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions