Re: Shorthands resetting properties they cannot set

On Mon, Nov 27, 2017 at 2:43 PM, Xidorn Quan <me@upsuper.org> wrote:
> On Tue, Nov 28, 2017, at 07:09 AM, Daniel Glazman wrote:
>> So I really wonder if our choice here of allowing some shorthands to
>> reset properties they cannot set was reasonable and if we've not
>> sacrificed easiness of authoring for an edge case that was not worth
>> it, and if a note in the spec saying a 'border' property will apply the
>> desired styles only if 'border-image' is also reset to its initial
>> value was not a much better, because more coherent, design. Our current
>> design is understandable, but weird.
>
> Another way around could probably be to have shorthands able to express
> more combination of value of its common-used longhands.
>
> In this specific case, if border shorthand is able to express different
> sides differently, authors wouldn't see the expanded form, e.g.
> something like
>> border: thin solid blue, thin solid red, thin solid red;

That's not a generic solution; at least some of the time, we don't
push more stuff into the shorthand because we simply *can't*.

Really tho, I'm just confused by the behavior Daniel discovered. I'd
need to dig - is that actually required behavior? It seems weird to
tear apart the shorthand declaration just because you added a longhand
- that could just as easily have just been "border: thin solid red;
border-top-color: blue;".

~TJ

Received on Monday, 27 November 2017 23:05:30 UTC