- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Thu, 22 Oct 1998 10:56:55 +0100 (BST)
- cc: www-style@w3.org
On Wed, 21 Oct 1998, Jelks Cabaniss wrote:
>>> I would like to contribute one suggestion: named styles -- just like
>>> in MS Word, Pagemaker, etc.
>> I don't quite see what you are looking for.
>> Can't you do this with <LINK REL="Alternate Stylesheet"> ?
> Have you ever used named styles in Word?
Yes. That particular implementation happens to be mighty terrible [1],
but I know what named styles are.
They are basically <DIV> tags with associated classes specifying a
single particular property set.
No structure, no cascading, no user/author interaction.
> Instead of using the default Heading 1, Normal, etc., you create
> your own styles
Well, you can do that in CSS:
* { your-own-style } /* Changes Normal Style */
H1 { your-own-style } /* Changes Heading 1 Style */
> then you can select text and apply those styles.
Ditto with CSS.
> Many (probably most) people don't bother with named styles, because
> they don't know about them; instead, they just apply the formatting
> directly (bold, italic, different font, whatever).
This would be like using <FONT>, <B>, <SMALL>, <TT>, etc.
> But if you are using named styles, it's similar to using CLASS
> attributes in HTML in that if you want to change the look of
> something, you only have to do it in *one* place: the style
> definition.
Ditto with HTML.
In Word, you still have to state that a paragrah has "Red Paragraphs"
style -- and changing the style will change all red paragraphs.
In HTML, if you state that a P is CLASS=RedParagraphs, then the
paragraph will have whatever style CSS gives it, and it can change. Of
course, CSS can change style across entire sites, and not single
pages.
> You can *sort of* do that now with CLASS styling in CSS.
No.
You can *sort of* do that now with Word. CSS does a *hell* of a lot
more.
> But CLASS properly used (IMO) should really apply to semantics, like
> <p class="legal">...
I agree too.
Your stylesheets would be called "The Red Style" and "The Blue Style",
and with a REL="ALTERNATIVE STYLESHEET" you can let the user decide of
Paragraphs with semantics legal should use the Red Style or the Blue
Style, along with the rest of the page.
> What you end up with today is a lot of stuff like <p
> class="ItalicRed"> which implies that CLASS means STYLE information.
You're doing it wrong.
You should be using the semantics to decide style in your CSS. The
HTML should have *no* relevance to
> You *may* want to style a particular CLASS, but you also may not
> care about what *type* of paragraph it is, just what it *looks*
> like.
Well, then don't apply CSS to classes.
P { color: red; }
I really don't understand what you want that CSS doesn't already do.
------------
[1]: eg, you cannot delete any of the 200+ default style names!!!
--
Ian Hickson
Received on Thursday, 22 October 1998 05:57:00 UTC