Re: Five new proposals about CSS

On Saturday 2005-10-15 17:24 +0200, David Latapie wrote:
> Gradient colours
> ----------------

I have a half-written detailed proposal for gradients.  They're not
quite as simple as you might think, though.

> List-style-type:character
> -------------------------
> 
> In order to avoid adding a lot of style type, this one allow you to  
> choose any character (arrows and check marks would be popular). It  
> only makes sense for unordered lists, though. This will be especially  
> valuable with Unicode (✔,✘,☺,☹,→,➡).

This is possible with the ::marker pseudo-element in css3-lists /
css3-content, for example:

ul.checklist li::marker { content: "✔"; }

> Updating selector support for XML
> ---------------------------------

>     span[xml:lang="fr"]    {font-style:italic}
>     <span xml:lang="fr">Bonjour !</span>
>     That won’t (on an otherwise valid document)

In CSS3 (using a proposal that's been around for quite a while) this is
done with:

@namespace xml url("http://www.w3.org/XML/1998/namespace");
span[xml|lang="fr"] { font-style: italic; }

(However, :lang() often has advantages over attribute selectors, since
it selects on a language inherited from a lang or xml:lang attribute on
an ancestor.)

In a non-namespace-aware implementation, you'd need to use
span[xml\:lang] (escaping the colon with a backslash), but that's
probably a bad idea anyway.

> [(X)HTML] Removing i and b elements
> -----------------------------------
> They can be replaced by:
> 
>     em and strong when it comes to semantics (an important text)
>     font-style:italic font-weight:bolder when it comes to  
> presentation (a different way to show it)

This isn't a CSS issue; it's an HTML one.  Proposing it on this list is
unlikely to do much.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Sunday, 16 October 2005 04:08:22 UTC