W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-document-class] defining basic style

From: Reece Dunn <msclrhd@googlemail.com>
Date: Thu, 5 Feb 2015 12:07:16 +0000
Message-ID: <CAGdtn26nMHeiP+S8Rw=Rn5c0OtYmVb4MhY87gzAFi_+zzbwnSg@mail.gmail.com>
To: Sanja Bonic <sanja.bonic@univie.ac.at>
Cc: www-style list <www-style@w3.org>
Hi,

Sorry for the blank post and top posting here (gmail's hidden content
is playing up with my browser, so I cannot reply inline).

The HTML5 spec (and WHATWG) has a reference guide on what CSS a
browser should use to render CSS content (see
http://www.w3.org/TR/html5/rendering.html#rendering). If you are
concerned that not all browsers do this, you could create a
html5styles.css file containing those styles and @import it in each of
the subdocuments, or @import it before importing the content-specific
rules.

Thanks,
- Reece H. Dunn

On 5 February 2015 at 11:57, Reece Dunn <msclrhd@googlemail.com> wrote:
> On 5 February 2015 at 11:38, Sanja Bonic <sanja.bonic@univie.ac.at> wrote:
>>>> >in LaTeX we have \documentclass{<classname>} to define the text's basic
>>>> >look. Has there ever been any interest in or discussion about defining a
>>>> >basic set of style names (like article, minimal, report, thesis, book,
>>>> >slides, etc)?
>>>> >
>>>> >I'm thinking of something like this to be included in the HTML head:
>>>> >
>>>> ><style>
>>>> >document-style {screen: book, paper: minimal, slides: presentation}
>>>> ></style>
>>>
>>> That's basically something like
>>>
>>>    @import url("book") screen;
>>>    @import url("minimal") print;
>>>    @import url("slides") projection;
>>
>>
>> Yes and no - importing still needs the boilerplate code that we could avoid
>> if the browser renders the basic style without having to import anything.
>>
>>> There have been and are many efforts to create re-usable style sheets,
>>> an early one is<http://www.w3.org/StyleSheets/Core/>, similarily some
>>> browsers come with pre-defined style sheets, e.g. Opera "Classic" lets
>>> users choose specialised style sheets for high contrast and similar
>>> things. There are probably mountains of "WordPress themes".
>>
>>
>> WordPress is not what I was aiming at. And one browser having its own
>> specialised stylesheets is good, but it's not a standard and it doesn't help
>> the user when they would like to apply a certain style without relying on a
>> CMS or the usage of one browser.
>>
>> I was thinking of a standardized set of guidelines for browsers so that a
>> document looks like a basic set of styles and the browsers themselves would
>> implement this. So, a normal user does not have to think of cross-browser
>> compatibility when they just want to write an article and maybe print them
>> later on in a different format. For these purposes, usually LaTeX is used
>> together with a basic document class, but only people who already have some
>> more advanced IT knowledge use LaTeX and the others are stuck with Word and
>> its alternatives.
>>
>> The core stylesheets you linked are a really early approach, as you said,
>> and would need some editing to adapt them to HTML 5. Also, I was thinking of
>> something much simpler where the user doesn't have to think and learn so
>> much. Why not File -> New Document in every browser that lets you create a
>> standard document and then apply a style to it? Could be more of WYSIWYG
>> where you just have textboxes that automatically get converted to h1,
>> article, and other "correct" tags that are then styled by the browser using
>> our style guidelines. The user can then save the HTML that was created and
>> add css as and if needed.
>>
>> This was just an implementation example. For the mailing list, my suggestion
>> is:
>>
>> 1. make available a tag for document class in HTML, similar to LaTeX
>> 2. have a set of style guideline standards including recommended HTML tags,
>> so that the browser devs know how to implement them - ensuring that a
>> certain style always looks the same, without the user having to use
>> third-party libraries or learn CSS just to make a two-column article
>> 3. for backwards compatibility, {all: minimal} is the default and does not
>> need to be specified - it is the basic styling of an HTML page as we know it
>> now
>>
>> All the best,
>> Sanja
>>
Received on Thursday, 5 February 2015 12:07:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC