Re: Shorthands resetting properties they cannot set

> On Dec 15, 2017, at 17:39, Daniel Glazman <> wrote:
> Le 15/12/2017 à 03:13, Florian Rivoal a écrit :
>> If an author writes "border: thin red solid" (with the right specificity) and they don't get a thin red solid border, they will complain even more loudly. That's why the border shorthand has to reset things like border-image.
> The number of authors hitting that case is so negligible compared to the
> number of authors using the old border properties w/o border-image-
> source I can't accept that argument. See below.
>> I do not think we have the choice between a confusing solution and a non confusing solution. Both are confusing in different situations. I think the confusion that would arise if shorthands didn't reset all the related properties, even when they cannot set them, would be worse than the one you've been complaining about.
>> Again, I am not saying you are wrong: the situation you describe is confusing too. But it's a tradeoff, and the alternative seems worse to me.
> border-image-source is almost unused (see * below) on the Web while the
> "classic" border width, style, color properties are used on more than
> 90% of the Web. The 'border' shorthand can hardly be measured, for OM
> reasons, but I'm pretty sure it's similar, it's everywhere. In such a
> case, the html world would reply "we can't change something that big w/o
> breaking things". In CSS, we do the contrary; ok, we're not "breaking"
> things per se, we are only breaking an association between 9 longhands
> and 1 shorthand that the whole Web has been using for more than 20
> years. And people complain about it. Amazing.
> * tried browsing some web sites listed in the URL above. Could not
>  find a single instance of applied border-image-source through a rapid
>  visit. It's used but deeper, probably in some specific areas. Then
>  I made a script to visit all the stylesheets to all the sites in my
>  personal bookmarks, not a single instance of 'border-image-source'.
>  Exactly what everyone said a while ago: super-powerful feature but
>  also too complicated (the slicing part is considered "painful" by
>  many web authors) and all in all, people don't use it.

So, for me, it seems there's 3 parts of to this argument:

1) Should shorthands reset related longhands if even if they cannot set them?
I say yes in the cases where not resetting the longhands would mean the shorthand wouldn't do the expected job.

If i say "border: thin solid red" or "background: url("foo.jpg")" I want a solid thin red border or a foo.jpg background. I want that to remain true when more properties are added to CSS, otherwise maintenance becomes harder.

2) Should the above behavior be true for some property and not others?
That looks messy and hard to learn.

3) Should border-image exist?

It is complicated and not used a whole lot, so maybe it does make the platform worse and we should not have introduced it. I've used it with success before, so I think it is an OK addition to the platform, but I am not anywhere near a full time author, so I am a bad source for judging that.


Received on Friday, 15 December 2017 09:23:52 UTC