harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zakharov, Vasily M" <vasily.m.zakha...@intel.com>
Subject RE: [classlib][swing][html] CSS is used to specify HTML tag behavior
Date Wed, 22 Aug 2007 07:03:22 GMT
Alexey,

Thank you for your attention to this issue. I'm not sure it's a bug that
needs to be fixed (RI does the same, right), but I think it's an
important issue that worth keeping record of.

I fully agree with all your considerations about using default
stylesheet for specyfying default document look. But there's look
(fonts, colors, sizes, weight, margins, padding etc.) and there's the
specified element behavior. For example, <center> tag is expected to
center text by default - and in our implementation (and in RI) it
doesn't. It seems strange, uncomfortable and confusing to me, and
probably to the users who would like to replace the default stylesheet
with their own. Making a user write "center { text-align: center}" in
his stylesheet is strange indeed. And by the way, IE allows replacing
the default stylesheet easily, and <center> tag works normally after
that.

I'm not suggesting to remove the replace default stylesheet feature, and
I'm not suggesting to merge the existing default stylesheet with user's
one. I'm only suggesting to make some (not all) default stylesheet
declarations (specifying core elements behavior) actual even if default
stylesheet is removed.

Particularly, I would expect <strong> behaving the same as <b> and <em>
the same as <i>, and <center> tag actually centering the text. Sure, I
don't care about font sizes, margins etc.

 Vasily


-----Original Message-----
From: Alexey Ivanov [mailto:alxey.ivanov@gmail.com] 
Sent: Wednesday, August 22, 2007 10:38 AM
To: dev@harmony.apache.org
Subject: [classlib][swing][html] CSS is used to specify HTML tag
behavior

Hello everyone,

There was created JIRA issue HARMONY-4662 [1], which says that
specifying the default presentation of HTML tags using CSS. I believe
this issue should be discussed here.

In short, Harmony implementation of HTML support has default.css file
which describes the default presentation of HTML elements. This
implementation is similar to that of RI. On the other hand, programmer
can remove (or disable) this style sheet. It leads to the situation
where almost all tags look like a plain text.

In my opinion, using CSS in this situation is the right thing to do.
1) We can easily make adjustments to the way HTML document looks by
default.
2) It gives application developers freedom for their application.
Developer can create their own default style sheet and easily replace
the default one shipped with Harmony. Replacing is more effective than
just overriding because Harmony-provided style sheet will be excluded
from style resolution chain, which, in its turn, will free memory and
will save time.
3) I believe all modern browsers (Internet Explorer, Firefox, Opera)
use the similar methods to specify the default look of HTML. The only
difference is that you cannot remove their default style sheet so
easily as in Swing.

Other opinions, comments?

Regards,
Alexey.


[1] https://issues.apache.org/jira/browse/HARMONY-4662

Other links of interest:
Sample style sheet suggested by W3C:
http://www.w3.org/TR/REC-CSS2/sample.html
Index of HTML 4.01 elements:
http://www.w3.org/TR/html401/index/elements.html

Mime
View raw message