Closed Bug 87566 Opened 25 years ago Closed 18 years ago

<LINK>'ed style sheets in text/html mail messages do not inherit styles

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows ME
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rainman, Unassigned)

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

As I understand CSS, if I have text in a binary HTML tag (e.g. STRONG, LI, P) and the provided style sheet does not explicitly list a style for that HTML element, then the element should inherit the style from the HTML element that contains it. So for example if I have a style sheet that only defines a style for the BODY element, if I have a paragraph element within that body, then the paragraph should be rendered with the same style that is specified for the BODY. Or if I specify a style for STRONG where I only specify that font-weight should be set to bold, but the BODY style indicates that the Arial font should be used, the text enclosed in a STRONG tag should be both bold and in the Arial font. Mail doesn't do this. A web service of mine sends an email specifying the MIME type of text/html, includes the <HTML> tag, the <HEAD> tag, and then a <LINK> tag referencing a style sheet to be used. The style sheet includes styles for BODY and LI, specifying font type and size. It includes a style for STRONG, specifying that it should be bold, but not explicitly saying a font type or size. But the text enclosed within P tags is not rendered in the font specified by the BODY tag; it uses Mozilla's default font. And the text enclosed in STRONG tags does indeed appear bold, but it also appears in Mozilla's default font. If my understanding of CSS is correct, these are standards compliance problems that need to be remedied. This problem does not appear in Navigator. I'm using Build 2001062204 on WinME. Thanks! -jag
Joshua, what's the URL referenced by the LINK tag? Could you attach an example email to this bug using http://bugzilla.mozilla.org/createattachment.cgi?id=87566 ?
Joshua: please post an example or we wouldn't know what the problem is.
Sorry for not doing this earlier... An example mail message: ----- Begin Mail Message ----- Received: from team.wiess.rice.edu (team.wiess.rice.edu [128.42.164.7]) by marsh.owlnet.rice.edu (8.11.0/8.9.0) with ESMTP id f6SJJHj10974 for <rainman@owlnet.rice.edu>; Sat, 28 Jul 2001 14:19:17 -0500 (CDT) Received: from AOLserver (localhost.localdomain [127.0.0.1]) by team.wiess.rice.edu (8.11.2/8.11.2) with SMTP id f6SJEEU23639 for <rainman@owlnet.rice.edu>; Sat, 28 Jul 2001 14:14:14 -0500 Message-Id: <200107281914.f6SJEEU23639@team.wiess.rice.edu> To: rainman@owlnet.rice.edu From: rainman@owlnet.rice.edu Subject: News from team.wiess.rice.edu: Please ignore this... Date: Sat, 28 Jul 2001 19:14:14 GMT MIME-Version: 1.0 Content-Type: text/html Content-Length: 772 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <BASE HREF="http://team.wiess.rice.edu/"> <LINK REL="StyleSheet" TYPE="text/css" HREF="http://team.wiess.rice.edu/master.css"> </HEAD> <BODY BGCOLOR="#FFFFFF"> <STRONG>Posted Sat, July 28, 2001 at 02:14 PM (CDT) by Joshua Ginsberg</STRONG> <P><P>Sorry, y'all, I'm just generating a test example so the good people at Mozilla can see a glitch in their mail program I found... Please just delete this...</P> <EM>-jag</EM></P> <HR> <P>You have received this as a user of <A HREF="http://team.wiess.rice.edu/">team.wiess.rice.edu</A>. If you wish to opt-out of receiving emails like this, you can set your user preferences in <A HREF="home/">your workspace</A> on the site.</P> </BODY> </HTML> --- End Mail Message --- --- Begin StyleSheet --- BODY, TD, LI, INPUT, PRE, P {font : 12pt Arial, sans-serif, sans-serif} TH {font : 12pt Arial, sans-serif; font-weight : bold; color : #ece618; text-align: left} H1 {font : 18pt Arial, sans-serif; font-weight : bold} A {font-weight : bold; text-decoration : none; color : #0700a0} A.white {font-weight : bold; text-decoration : none; color : #ffffff} A:HOVER {text-decoration : underline} CITE {color : #ffffff; text-decoration : none} STRONG {font-weight : bold} INPUT, TEXTAREA {font : 10pt Arial, sans-serif} IMG {padding: 8px 8px 8px 8px} --- End StyleSheet --- In this case, since I've specified a font for the BODY tag, all tags should inherit the font selected... however the strong text is rendered in Times New Roman... the emphasized text is also rendered in Times New Roman... the anchors render properly as well as the paragraphs... Let me know if there's more that I can do... Thanks! -jag
would you mind sending a copy of the mail to my email address? ;)
I ordered my webserver to send it to you... let me know if it worked or not, please... -jag
jag: can you try a later build of mozilla? with build 2001072603 win32 it seems to work fine.
I am now using 2001072908 and part of the problem has been resolved... the strong and emphasized text within the paragraph inherit the font face from the paragraph tag, but I'm still having trouble with the strong text inheriting the font face from the body tag...
Attached file testcase (obsolete) —
Attached image screenshots
Confirming bug. Sending to style system
Status: UNCONFIRMED → NEW
Component: Mail Window Front End → Style System
Ever confirmed: true
Product: MailNews → Browser
ducarroz, is this a dup of a bug you were working on? (someone did a send page of http://cnn, and the link styles were messed up?)
I don't think so. I was working on a problem when the page use relative links and doesn't specify a HREF base within the HTML headers. This problem occurs only if the user save locally the page first and then send it as we lost the origin of the page!
Any developments on resolving this? Has it been resolved and I'm not aware of it? Oh, and since it was confirmed and a person was assigned to it, I'm putting the status to assigned as opposed to new... -jag
Status: NEW → ASSIGNED
I don't know if this is related but if I load the page "gon.virtualglobe.de" in mozilla the style sheet is ignored (it's included using the link tag). With Netscape 4 this works fine (i.e. the links shouldn't be underlined).
That external stylesheet has HTML markup in it... file an evangelism bug on that site if you care enough to get them to change it. :)
Testcase WFM now, yesterday's Linux CVS.
Keywords: testcase
Attached file testcase css file
Attachment #43965 - Attachment is obsolete: true
Attached file testcase html
QA Contact: esther → style-system
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Status: ASSIGNED → NEW
The attached testcase (comment 17 and 18) works for me. Is this bug still present?
reporter email address invalid. closing WFM per bz's comment 20.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: