Re: [css-cascade] Dropping 'default'

(2013/07/02 15:36), L. David Baron wrote:
> On Monday 2013-07-01 12:52 -0700, fantasai wrote:
>>   B. Introduce initial-or-inherit as both keywords, thus:
>>
>>        <common-keywords> = initial || inherit
>>
>> B could be bikeshedded a bit more, but this a) uses only reserved
>> keywords and b) isn't as confusing as 'default'.
> 
> I really don't like 'inherit initial' or 'initial inherit' meaning
> "one of 'inherit' or 'initial' depending on the property".  I think
> it's unclear and confusing that the list of two values actually
> means "pick whichever one of these the property does by default".
> It should be a single keyword instead.

I kind of agree. Also, I still haven't got rid of the idea in my brain
that 'inherit inherit' in a shorthand might mean 'inherit' for each
longhand. Did any old browser does that?

Side Question: do

  'text-underline-position: [ under || [ left | right ] ]'

and

  'text-emphasis-position: [ over | under ] && [ right | left ]'

share simillar concerns? Or no because this is chosen at the
computed-value-phase unlike 'initial inherit', which is chosen at parse
time?

(2013/07/02 17:58), François REMY wrote:>
> What about "property: undeclare"?
>
> The semantics would be: when the cascaded value of a property is
> "undeclare", act like if the property wasn't declared on the element
> (and fallbacks to its initial or inherited value depending on whether
> lksqjf lkdsqjfmq lskdfqjsqm lksld fqmjk).
>
> (are there use cases for this? user stylesheets maybe?)

Isn't this what cascasde-dependent "default" is about?

(2013/07/02 3:52), fantasai wrote:>
> 2. Default is a terrible name for "initial-or-inherit". Consider:
>        html { font: 16px Authors Favorite Font; }
>        article.main  { font: default; /* use user's default */ }
>      You'd think that would work, right? But it doesn't work,
>      because 'default' in this case resolves to 'inherit'.

I am not sure this is a good example because it looks a bit made up (the
author would use 'font: initial' in this case). But then, I agree that
"initial-or-inherit" doesn't seem like it has enough use cases that's
not covered by cascasde-dependent "default".

Though for a property that's hard to remember it's inheritablity (like,
say, 'justify-content'), I wonder if "initial-or-inherit" could be useful.



Cheers,
Kenny
-- 
Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/

Received on Friday, 5 July 2013 01:43:37 UTC