Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to Implement and Ship: CSS padding-block and padding-inline shorthands

68 views
Skip to first unread message

Mats Palmgren

unread,
Jan 14, 2019, 12:58:09 PM1/14/19
to dev-platform
Summary: The padding-block CSS property is a shorthand for the
padding-block-start/end properties (ditto -inline)

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1519847

Link to standard: https://drafts.csswg.org/css-logical/#propdef-padding-inline

Platform coverage: All platforms

Estimated or target release: Firefox 66

Preference behind which this will be implemented: None

Is this feature enabled by default in sandboxed iframes? Yes

DevTools bug: N/A, devtools support is included in the patch

Do other browser engines implement this? No,
https://wpt.fyi/results/css/css-logical/logical-box-padding.html

web-platform-tests:
http://w3c-test.org/css/css-logical/logical-box-padding.html

Is this feature restricted to secure contexts? No


/Mats

Mats Palmgren

unread,
Jan 14, 2019, 12:58:14 PM1/14/19
to dev-platform

Boris Zbarsky

unread,
Jan 14, 2019, 1:23:14 PM1/14/19
to
On 1/14/19 12:58 PM, Mats Palmgren wrote:
> Link to standard:
> https://drafts.csswg.org/css-logical/#propdef-padding-inline

Two quick questions on the spec:

1) 'padding-block-start' is defined as:

Value: <‘padding-top’>

while 'padding-block' is defined as:

Value: <‘padding-left’>{1,2}

It probably doesn't matter too much because padding-top and padding-left
have the same value space, but it's a bit weird and makes one go
sleuthing to ensure that they do. Do you know whether this is
purposeful or just a typo?

2) We are just implementing the padding shorthands for now, not the
margin ones?

> Do other browser engines implement this? No,
> https://wpt.fyi/results/css/css-logical/logical-box-padding.html

Do they plan to? That is, is the spec reflecting some sort of general
consensus?

-Boris

Emilio Cobos Álvarez

unread,
Jan 14, 2019, 1:31:56 PM1/14/19
to dev-pl...@lists.mozilla.org, Oriol Brufau
They're on Blink under an experimental flag:


https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/css_properties.json5?l=4872&rcl=b166577f0820ba3f3aefe3c0fbe330c8e2f86dc9

Indeed the tests were added by Oriol while implementing them IIRC.

So I assume the answer is "yes, they plan to eventually ship it".

-- Emilio

Mats Palmgren

unread,
Jan 14, 2019, 1:43:52 PM1/14/19
to
On 1/14/19 7:23 PM, Boris Zbarsky wrote:
> Do you know whether this is purposeful or just a typo?

Dunno. It seems like a typo to me.

> 2) We are just implementing the padding shorthands for now, not the margin
> ones?

Yes, but I should probably just add margin-block/inline while I'm at it...
Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1519944


/Mats

fantasai

unread,
Jan 14, 2019, 9:09:48 PM1/14/19
to
On 1/14/19 10:23 AM, Boris Zbarsky wrote:
> On 1/14/19 12:58 PM, Mats Palmgren wrote:
>> Link to standard: https://drafts.csswg.org/css-logical/#propdef-padding-inline
>
> Two quick questions on the spec:
>
> 1) 'padding-block-start' is defined as:
>
>   Value:  <‘padding-top’>
>
> while 'padding-block' is defined as:
>
>   Value:  <‘padding-left’>{1,2}
>
> It probably doesn't matter too much because padding-top and padding-left have the same value space,
> but it's a bit weird and makes one go sleuthing to ensure that they do.  Do you know whether this is
> purposeful or just a typo?

I have no idea why I did that. Fixed.

> 2) We are just implementing the padding shorthands for now, not the margin ones?
>
>> Do other browser engines implement this? No,
>> https://wpt.fyi/results/css/css-logical/logical-box-padding.html
>
> Do they plan to?  That is, is the spec reflecting some sort of general consensus?

Yes, the spec reflects general consensus, and has been explicitly cleared
for shipping by the CSSWG (as of several years). See issue at the bottom
of the intro:
https://www.w3.org/TR/css-logical-1/#intro

~fantasai

Boris Zbarsky

unread,
Jan 14, 2019, 9:28:23 PM1/14/19
to
On 1/14/19 9:09 PM, fantasai wrote:
> I have no idea why I did that. Fixed.

Thank you!

> Yes, the spec reflects general consensus, and has been explicitly cleared
> for shipping by the CSSWG (as of several years). See issue at the bottom
> of the intro:
>   https://www.w3.org/TR/css-logical-1/#intro

Perfect, thank you for the pointer.

-Boris
0 new messages