Closed
Bug 30127
Opened 25 years ago
Closed 24 years ago
-moz-fixed not friendly with the cascade
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: ian, Assigned: pierre)
References
()
Details
(Keywords: css2, fonts)
You don't seem to be able to override, using the 'inherit' keyword, the font of elements which have been styled with the -moz-fixed font in html.css. The test document contains a piece of emphasised text and a piece of code. They should both have the same font as the parent paragraph, exactly. (They are also both blue.) However, while the emphasised text does indeed lose its default italic, the piece of code does not lose its font. http://www.bath.ac.uk/%7Epy8ieh/m/mozfixed-universal.html FYI, the page contains this stylesheet: em, code, pre { font: inherit; color: blue; background: white; } David, Erik: I've cc'ed you in case you are aware of this bug already and know of a DUP. I could not find any. And a brief persual through lxr.mozilla.org did little to enlighten me as to the cause of this problem.
Reporter | ||
Comment 1•25 years ago
|
||
BTW, this bug is blocking one of my projects. If anyone has a workaround I'm all ears... Marking {font} for pierre. Downgrading to P4.
Priority: P3 → P4
Summary: -moz-fixed not friendly with the cascade → -moz-fixed not friendly with the cascade {font}
Reporter | ||
Comment 2•25 years ago
|
||
More data: code { font: 1em monospace; } ...works as expected (so I'm using it as a workaround). Strange. Very strange. I'm sure there is a perfectly rational answer to this...
Are you sure this is a problem with -moz-fixed and not a problem with: * the cascade (could be tested by changing -moz-fixed to monospace in ua.css) * the inherit value on 'font' or 'font-family' (could be tested lots of ways)? I may have the chance to test myself...
Assignee | ||
Comment 4•25 years ago
|
||
Someone (Paul Hangas, I think) reported about 2 weeks ago in a bug that I can't find back that when an element uses "font-family:-moz-fixed" (like input[type= text] in html.css), the font cannot be overriden. His workaround was to use Courier or monospace instead of -moz-fixed. I think I noted in the aforementioned bug that I had already fixed something like that for bug 17303 (see my comment from 2000-01-11 02:07). Help would be appreciated to find the bug, mark it as dup, and write a testcase for this one.
Assignee | ||
Comment 5•25 years ago
|
||
Forget what I wrote: it wasn't a bug but a discussion we had by email between hangas, rods, akkana, buster, german and myself. The problem described by hangas was: The text field is totally skinable now. You can set the font-family and font- size in html.css and everything works fine. The problem is that if you set the font-family in html.css to -moz-fixed then we cannot override this style in global.css for html:input fields. If we can change the html.css style to a normal font family like Courier or something then everything will work for beta1. I don't know why we use -moz-fixed but choosing another font there would allow us to fix the chrome. Later we someone can fix the bug that prevents this font-family from being overridden in another css file when it has been set to -moz-fixed. So the present bug is valid. A testcase would be nice...
Reporter | ||
Comment 6•25 years ago
|
||
Um, see the original entry for this bug. :-) Or, just look at: http://www.bath.ac.uk/%7Epy8ieh/m/mozfixed-universal.html
Keywords: fonts
Summary: -moz-fixed not friendly with the cascade {font} → -moz-fixed not friendly with the cascade
Comment 7•25 years ago
|
||
Assigning to ekrock: 1/3 of Pierre's NEW bugs to help reduce his doomage factor
Assignee: pierre → ekrock
Assignee | ||
Comment 8•25 years ago
|
||
Reassigned back to me these bugs that shouldn't have left my list.
Assignee: ekrock → pierre
Comment 9•25 years ago
|
||
Is this bug I'm seeing related? It's form HotBot.com. It seems that nesting some css code within font tags screws up the css. A span sets the font-color to red but the red "bleeds" beyond that span. I believe this is a regression bug since it didn't appear until M13 and M14. See this test case: http://staff.hotwired.com/mikeque/mozilla/nesting_bug.html
Mikeque - That's a completely separate bug, probably in residual style handling, and should be filed against the Parser.
Comment 11•25 years ago
|
||
I opened a new bug for that bug (31421). Thanks, Mike
Assignee | ||
Comment 12•24 years ago
|
||
*** Bug 31744 has been marked as a duplicate of this bug. ***
Comment 13•24 years ago
|
||
A simple test case is attached to bug #31744: <http://bugzilla.mozilla.org/createattachment.cgi?id=31744> Need this for bug #31047 (I need "<pre>" for the "whitespace: pre", but want to conditionally overwrite the "font-family" in Mozilla).
Keywords: css2
Priority: P4 → P3
Comment 14•24 years ago
|
||
> I need "<pre>" for the "whitespace: pre"
In *other* UAs
(Sorry for the spam.)
Assignee | ||
Comment 15•24 years ago
|
||
Fix checked in nsCSSStyleRule.cpp.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
wow, that was fast! tnx.
Reporter | ||
Comment 17•24 years ago
|
||
Original test case renders fine now. Thanks pierre.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•