W3C home > Mailing lists > Public > www-style@w3.org > November 1999

A whole host of pseudo-elements

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Wed, 3 Nov 1999 04:13:20 -0800 (PST)
Message-ID: <19991103121320.20047.rocketmail@web906.mail.yahoo.com>
To: www-style <www-style@w3.org>
A commonly used typographical effect is that of having
the first letter of headings or words larger, bolder,
or stretched, etc.

There is no way in CSS 3 as it stands to do this.

However, if we add a new :first-letters element
applying to the first letter of every word, the
problem is removed.

E.g., H1 {text-transform: uppercase; font-size: 150%;
color: blue}

H1:first-letters {color: red; font-size: 170%}

Which leads me on to these, which might be of use:

:last-line (frequently used)

Which leads me on to the example of where we want
capital letters (as opposed to first letters of words)
to be in a different style.

UAs are already required to know the difference
between lower and uppercase letters so there is no
problem here:
P:caps {color: red; font-size: 120%; font-family:
P:lowercase {font-family: sans-serif}

Further to this you could have :numbers and
:punctuation matching numbers and punctuation

However the best thing is to allow :\x {font-family:
whatever}. This pseudo-element says that you want x's
to have the specified formatting.

For example, I have seen this effect :\[, :\] {color:
blue}. This would make square brackets blue.

The advantages of being able to mix and match are
enormous, for example, you might want your zeroes to
be in a monospaced font.

The advantages become even greater when you consider
the font-matching algorithm. This states that when the
font does not contain the requested glyph the next
font in the font-family declaration should be used.

However, this may not be the best font for the
requested glyph.

By extending the :\ pseudo-element, to take a 6 digit
Unicode reference we can specify the properties for
each and every glyph.

Thus when P {font-family: NiceFontForNormalCharacters,
SlightlyLessNice, sans-serif}, the fonts that look
good for normal characters might not look good for
(for example, greek letters).

I find that fonts that look good for normal text often
have very poor glyphs for things like Lambda, and it
would be good if by saying :\Unicode reference for
Lambda {font-family: "A good Greek font"}.

Thus to conclude, the :\ pseudo-element can be
followed by either precisely one alphanumeric
character, or exactly 6 digits (to avoid ambiguity)
that refer to the Unicode reference for the character.

Properties that would be defined would be the same as
those that would be defined for :first-letter.

From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
Received on Wednesday, 3 November 1999 07:13:22 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC