Closed
Bug 248063
Opened 20 years ago
Closed 20 years ago
ignored/misinterpreted CSS-elements
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: Franz.Offenbaecher, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616 Mozilla ignores some CSS-statements: it doesn't see 'inherit' as a valid token (http://www.w3.org/tr/rec-css2/cascade.html#value-def-inherit) and it is misinterpreting lengths (http://www.w3.org/tr/rec-css2/syndata.html#value-def-length) if given with a leading '+' or '-'. Reproducible: Always Steps to Reproduce: 1. create styles using the mentioned features 2. apply them 3. see the results Actual Results: 'inherit' is treated illegal and kills the whole statement. +<value>-lengths are used like <value>-lengths. -<value>-lengths are ignored. Expected Results: respect the W3C-rec.
Comment 2•20 years ago
|
||
In your attachment, I don't really see what the problem is (using Firefox 0.9, which is the same base as Mozilla 1.7). It looks like the inherit is working correctly, and the "+30pt" does appear as 30pt text. Could you describe exactly what you see for your sample? Or maybe attach a screenshot?
(In reply to comment #2) >… It looks like the inherit is working > correctly, Not fully here. Have a look on the attatchment 151454: the sequence "but blue" took the color but nothing from the font settings in its class. > and the "+30pt" does appear as 30pt text. Sigh - I think I've become a victim of my english knowledge: as I read the W3C-stuff I understood something like '+x' is giving a result like 'inherit + x'. Of course I should posish my language skills. But I don't know a place to train technical terms for HTML and such things. But as I wrote: the html-file has been my playground. All combinations of params with inherit I tested failed here, mozilla is trashing the statement with this term in it (as W3C says, this would be correct *if* inherit woud be an illegal token). Isn't it?
Comment 5•20 years ago
|
||
Ok - now that I look, I think that you have misunderstood about the "inherit" too. The "font:" property is a shorthand for several other properties. If you look at the syntax given at http://www.w3.org/TR/REC-CSS2/fonts.html#font-shorthand You can see that "inherit" is an alternative to everything. So you can either say: font: bold 30pt sans-serif; or you can say font: inherit; but you cannot inherit some parts and not others. To do that, you need to use font-size:, font-style:, etc separately. That is because for "font:" you can give the parameters in different orders and they are optional, so you can have: "font: bold 30pt sans-serif;" or "font: bold sans-serif 30pt;" and then if you say "font: 20pt inherit;" it cannot know what you meant to inherit. Instead, you must say, for example: "font-weight: bold; font-size: 30pt; font-family: inherit;" In nearly all cases, you don't need the "inherit", because it will happen automatically. So I don't think there is a bug here.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(In reply to comment #5) > Ok - now that I look, I think that you have misunderstood about the "inherit" too. > > The "font:" property is a shorthand for several other properties. If you look > at the syntax given at > http://www.w3.org/TR/REC-CSS2/fonts.html#font-shorthand Oh! Yes, after reading your text and having another look at the W3C-doc, I believe you're right. But as you tell me, inherit can replace nearly everything. So the W3C-documentation is a bit - how should I say? Wrong? Not really. But: now I can't se a real usage for the inherit in the font shorthand property. Why? Nobody could tell, which part it should replace as long not all of the other params are noted. Oops: this does belong to 'normal' too! Or could you tell me, which property is used if I write down one 'normal'? Style, variant or weight? Which one would be altered, which one not? For example, let there be a paragraph set to italic bolder 12pt serif. Now you would apply a class on it telling 'font: normal 10pt cursive' - what should be the result? How do you think about that?
Comment 7•20 years ago
|
||
"could you tell me, which property is used if I write down one 'normal'?" You wouldn't do that, because using "font:" resets the values anyway. For example, if you have a paragraph set to "italic bolder 12pt serif", and then you specify a class that says "font: bold;", you will get non-italic text in the default size and variant. If you give just one "normal", everything will be reset. The CSS document says: "All font-related properties are first reset to their initial values... Then, those properties that are given explicit values in the 'font' shorthand are set to those values." So, you either need to use the specific settings (font-variant, font-weight, etc) to set just one thing, or you can use "font:" and specify all the settings each time. Personally I prefer to always use the specific font-family, font-size, font-weight. Anyway, this is not a good place to discuss CSS. http://www.allmyfaqs.com/faq.pl?CSS_FAQs has some useful links to information about CSS, there is a german site at http://www.css-technik.de/ , or you could try the comp.infosystems.www.authoring.stylesheets newsgroup.
(In reply to comment #7) > "could you tell me, which property is used if I write down one 'normal'?" > > You wouldn't do that, because using "font:" resets the values anyway. … > The CSS document says: > "All font-related properties are first reset to their initial values... Then, > those properties that are given explicit values in the 'font' shorthand are set > to those values." But what are 'initial values'? The sentence doesn't say 'reset to everything off' or so. Initial could be understood as defined by the parent or some default by the client. I think, that's not absolutely clear. > So, you either need to use the specific settings (font-variant, font-weight, > etc) to set just one thing, or you can use "font:" and specify all the settings > each time. Problem: what is 'font: normal inherit inherit 120%'. The documentation seems to say, that is a valid one. But now I think, the syntax is good but the semantics are lousy. > Personally I prefer to always use the specific font-family, font-size, font-weight. Now I do understand. Thank you! > Anyway, this is not a good place to discuss CSS. > http://www.allmyfaqs.com/faq.pl?CSS_FAQs has some useful links to information > about CSS, there is a german site at http://www.css-technik.de/ , or you could > try the comp.infosystems.www.authoring.stylesheets newsgroup. Thanks for that too. And you're right, let's stop this now. Have fun with all the bytes :-) Franz
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•