W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [css-backgrounds] 'border' shorthand resets 'border-image' but can't set it

From: Daniel Glazman via GitHub <sysbot+gh@w3.org>
Date: Thu, 21 Dec 2017 06:28:00 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-353269086-1513837679-sysbot+gh@w3.org>
> So authoring tools are going to need special logic for handling it, regardless.

My goodness, no they are not! You are missing the point here: authoring tools do not reinvent the wheel and rely on the serialization rules ALREADY implemented in the CSS OM of the rendering engine they use. AFAICT from my tests and implementations, this works very well for both specified (in stylesheets or inline styles) and computed style in all engines available today on the market. That's why setting the four borders never outputs 'border' any more, breaking 20+ years of common practice. If editing tools are expected to be able to deal with this, it means:

1. they're working around the spec
2. it's clearly a hack
3. they're re-implementing serialization - and they should not do that

For your test case above, we should not have changed 'border'. We should have added an extra shorthand for both the line border and the image border. The way we changed the spec was a hack. CSS 2.1 said shorthands "allow authors to specify the values of several properties with a single property". We changed that.

GitHub Notification of comment by therealglazou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2108#issuecomment-353269086 using your GitHub account
Received on Thursday, 21 December 2017 06:28:03 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC