Use of style attribute?

"Robert Gibbins" <[email protected]>
Newsgroups gmane.culture.literature.e-books.gutenberg.volunteers
Message-ID <DA43976C19A84CEF8FE7432D707F0AF4@ThinkPadE13A>
On 11/6/2012 Lee Passey wrote various examples of using the style atribute,
for example:

<h4 style="page-break-before:always><br />Chapter One</h4>

At the end of the append, he wrote:

> On the other hand,
><div class="center">
>with a corresponding CSS of
>div.center{  text-align:center; }
>doesn't make sense to me. The <div> isn't a "center", and there is no 
>reason you would want to alter its presentation. If it's supposed to be 
>centered, and there is no real presentational alternative, just put the 
>styling right on the element to be styled.

Personally I rather like this idea as it neatly gets me out of another
problem I thought was unavoidable, namely the need to have a whole series of
classes in a generic css file which only differ by a parameter value, for
example:

/* - - - Left margins */
div.margin-left-1 {margin-left: 0.5em}
div.margin-left-2 {margin-left: 1em}
div.margin-left-3 {margin-left: 1.5em}
div.margin-left-5 {margin-left: 2.5em}
div.margin-left-7 {margin-left: 3.5em}
div.margin-left-10 {margin-left: 5em}
div.margin-left-15 {margin-left: 7.5em}
div.margin-left-20 {margin-left: 10em}
div.margin-left-25 {margin-left: 12.5em}

(What would be nice is to have parameters in class definitions to get round
this, hypothetically somewhat as follows:
<* - - - Left margins */
div.margin-left(n number) {margin-left: n em}
Syntactically this is nonsense, but I hope it is reasonably clear what I
would like to be able to do.)

Lee's scheme seems to offer another way round this problem, namely that one
would merely at the appropriate point in the text mark up with 
<div style="margin-left: n em">text content</div> thus not needing any css
classes at all.

However the reason I didn't go this way to start with is that use of the
style attribute appears to be deprecated in both the epub 2 and epub 3
specifications. I assume this means that sooner or later the standard will
drop support for it. Have I misunderstood?

Bob Gibbins

_______________________________________________
gutvol-d mailing list
gutvol-d-4LCm/o+qPMZ96Xl/[email protected]
http://lists.pglaf.org/mailman/listinfo/gutvol-d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.