-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-backgrounds-4] default background-origin for border-area
in shorthand
#11167
Comments
(I presume the end of your second bullet point means to say Yes, I definitely think that I'm mildly against doing this with the initial value (rather than just via the shorthand); we don't match up the values today for any of the values; that is, if I set |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> fantasai: in the bg shorthand if you specify a single keyword like 'border-box', it sets both clip and origin to that keyword<TabAtkins> fantasai: but 'border-area' keyword is only valid for clip, not origin <TabAtkins> fantasai: want to clarify that in that case, origin defaults to border-box <TabAtkins> +1 to this from me <kizu> +1, makes sense <oriol> +1 <TabAtkins> Rossen0: objections? <fantasai> background: ... border-area; <emilio> A bit unfortunate that it's different from background: ...; background-clip: border-area <emilio> But yeah <TabAtkins> RESOLVED: Using 'border-area' in the background shorthand (and omitting origin) defaults the origin to border-box <TabAtkins> fantasai: second, do we want some way to make things default if you specify the longhand? <TabAtkins> fantasai: argument for, it's unfortuante/confusing to get it set to the "wrong" value <TabAtkins> fantasai: argument against, it's not something we're currnetly doing <TabAtkins> Rossen0: okay, will leave that part of the discussion <fantasai> for other values of background-clip (though maybe we should have) |
…ified https://bugs.webkit.org/show_bug.cgi?id=283308 rdar://140142957 Reviewed by NOBODY (OOPS!). If the origin is not specified, but clip is given as border-area, set origin to border-box. See w3c/csswg-drafts#11167 * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid.html: * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
…ified https://bugs.webkit.org/show_bug.cgi?id=283308 rdar://140142957 Reviewed by NOBODY (OOPS!). If the origin is not specified, but clip is given as border-area, set origin to border-box. See w3c/csswg-drafts#11167 * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid.html: * Source/WebCore/css/ShorthandSerializer.cpp: (WebCore::ShorthandSerializer::serializeLayered const): * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
…ified https://bugs.webkit.org/show_bug.cgi?id=283308 rdar://140142957 Reviewed by Tim Nguyen. If the origin is not specified, but clip is given as border-area, set origin to border-box. See w3c/csswg-drafts#11167 * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid.html: * Source/WebCore/css/ShorthandSerializer.cpp: (WebCore::ShorthandSerializer::serializeLayered const): * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeBackgroundShorthand): Canonical link: https://commits.webkit.org/287521@main
…ified https://bugs.webkit.org/show_bug.cgi?id=283308 rdar://140142957 Reviewed by Tim Nguyen. If the origin is not specified, but clip is given as border-area, set origin to border-box. See w3c/csswg-drafts#11167 * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-shorthand-serialization.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-valid.html: * Source/WebCore/css/ShorthandSerializer.cpp: (WebCore::ShorthandSerializer::serializeLayered const): * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::consumeBackgroundShorthand): Canonical link: https://commits.webkit.org/287521@main
In #10907 (comment) @jsnkuhn wrote:
There's two relevant questions
background-origin
checkbackground-clip
to compute a smart default valuebackground
shorthand, when one box keyword is specified it's applied to bothbackground-clip
andbackground-origin
(spec); butborder-area
is not a valid keyword forbackground-origin
, so should we default it toborder-area
.I think we should definitely fix the latter. Unsure about the former, though it would certainly be helpful to authors.
The text was updated successfully, but these errors were encountered: