Re: CSS2.1 Various Inline-related Stuff

On Thu, 29 Aug 2002, fantasai wrote:
> 
> If there's no difference between
>   content: none;
> and
>   display: none;
> then I don't think 'none' should be an accepted value for 'content'.

I was about to go into a long discussion about how "" and 'none' are
different and neither is the same as 'display:none' when I realised that
in fact 'content:""' and 'content:none' are the same if 'display' is
'inline', which is the initial value.

D'oh.

I'll need to think about this in more detail. I think 'content:none' may
be made to force 'display' to 'none' for ':before' and ':after' (and
certain other CSS3 pseudo-elements) if it is set to 'inline'.

(Note: 'none' and "" are not the same, and neither are the same as
'display:none', if 'display' is set to 'block'.)


>   If CSS3 extends 'content' to real elements, its initial value
>   must be 'auto' (self), not 'none' (nothing). Therefore, the
>   initial value of 'content' in CSS2 cannot be 'none'.

The initial value will be 'normal', which for elements will compute to
'contents' (the element's children). That's the current line of thinking,
anyway. I think you are right that for generated content this should
change the 'display' value directly.


> I'd go with 'initial' for CSS2 border-color, if anything. It
> seems more sturdy than guessing at the future CSS3 Box Model.

In CSS3, 'initial' will be a special keyword like 'inherit'. (Mozilla
implements 'initial' as '-moz-initial'.) Neither can end up as the
specified value, let alone the computed value. CSS3's 'border-color' will
hopefully have a special keyword for its initial value (like Mozilla's
'-moz-use-color' or whatever we called it).

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 31 August 2002 16:31:28 UTC