W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css4-background] border-corner-shape extension point?

From: Stu Cox <stuart.cox@gmail.com>
Date: Mon, 25 Mar 2013 09:44:47 +0000
Message-ID: <CAJ-2Ov6kWk=fhpgimhegXNu6+6xh0bkN0FduPdhyPGwpaovO5A@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Lea Verou <lea@w3.org>, www-style list <www-style@w3.org>
@Brad - you could use @supports to fall back to a border-image:


@supports (border-corner-shape:scoop) {
    .module {
        border-corner-shape: scoop;
        border-radius: 50%;
    }
}

@supports not (border-corner-shape:scoop) {
    .module {
        border-image: <fallback_values>;
    }
}


Stu Cox
@stucoxmedia


On 25 March 2013 09:44, Stu Cox <stuart.cox@gmail.com> wrote:

> If `border-radius` and `border-corner-shape` could both be specified as
> part of a shorthand property, the developer could decide how it should fall
> back; e.g.:
>
>
> /* Falls back to rounded corners */
> .module {
>     border-corner-shape: scoop;
>     border-radius: 50%;
> }
>
> /* Falls back to a rectangle */
> .module {
>     border-corner: scoop 50%;
> }
>
>
> I appreciate the syntax isn't ideal... if only `border-radius` had been
> named `border-corner-radius`!
>
>
> Stu Cox
> @stucoxmedia
>
>
>
> On 24 March 2013 22:42, Brad Kemper <brad.kemper@gmail.com> wrote:
>
>> On Mar 24, 2013, at 3:04 PM, Lea Verou <lea@w3.org> wrote:
>>
>> > True, but wouldn’t a rectangle be an even worse fallback?
>>
>> Maybe, maybe not. Maybe the author could have a border-radius with some
>> other measurement as fallback. I think ideally (in terms of results),
>> border-image would be more useful as a fallback. But I'm not sure how that
>> would happen.
>>
>
>
Received on Monday, 25 March 2013 09:45:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT