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

> 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