Menu

#13 Ditch the <font> tags

open
5
2004-05-18
2004-04-24
Dan
No

I love your applet to bits (or is that bytecode), however
if you could say perhaps avoid the use of <font>, due to
its general nastyness.

This could be better expressed with CSS, and although
difficult to implement as a central stylesheet...

Perhaps this could be achieved with some kind of
background thread that checks whenever a new tag is
completed that requires stylistic-ishness (basically,
whenver Ekit feels the need for <font>) - cycles through
looking for identical <font> tags. These could be
collected together and reinterpreted as a CSS class.

IE
<font color="black">My text</font>
<font color="black">My text2</font>
<font color="white">My other text</font>
<font color="black">My text3</font>

The code is parsed, and <font color="black"> occurs
thrice; so then the attribute is interpreted into CSS.
<font color="white"> could probably be safely ignored, as
it is a once off occurance.
Replaces string <font color="black"></font> with <span
class="fontBlack"></span>.

Anyway, keep pluging away at it!

Discussion

  • Howard Kistler

    Howard Kistler - 2004-04-25

    Logged In: YES
    user_id=103018

    Hey there,

    While it would be nice indeed to escape from using FONT tags
    and use something like "smart style", it's one of those
    things that requires a lot of forwarding-thinking on the
    program to handle. Ekit would not only have to create and
    maintain these CSS properties that you suggest, but also
    handle collisions in the CSS namespace, and furthermore
    decide when to abandon one style for another (say, if you
    change the font family for one instance of the "smart
    style", but not others).

    Of course, nothing prohibits making a thorough stylesheet in
    advance, and then using the style selector to make all font
    changes instead of the FONT tag based ones. But ultimately,
    it would probably require a built-in CSS editor to allow for
    new styles to be created on the fly without too much other
    trouble.

    Something to consider for a future release. Thanks for the
    suggestion!

    Howard Kistler

     
  • Howard Kistler

    Howard Kistler - 2004-05-18

    Logged In: YES
    user_id=103018

    Good news - I'm in the process of fixing some of the worst
    effects of the FONT tags by having style changes retain
    existing styles. Already I've fixed the problem where
    changing the font would also change the size. Hopefully I'll
    have the rest done soon, so that it acts more responsibly
    with fonts and less wonky.

    Howard Kistler

     
  • Howard Kistler

    Howard Kistler - 2004-05-18
    • assigned_to: nobody --> hexidec
     

Log in to post a comment.

MongoDB Logo MongoDB