pjs/layout/style/quirk.css

208 строки
4.4 KiB
CSS
Исходник Обычный вид История

/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
/* Quirk: input images have a blue border (b=28010) */
/* default border */
input[type=image] {
border: 2px solid blue;
}
/* border when focused -- only change style to dotted */
input[type=image]:focused {
border-style: dotted;
}
/* border when focused -- only change color to gray */
input[type=image][disabled] {
border-color: GrayText;
}
/* Quirk: make orphaned LIs have inside bullet (b=1049) */
/* force inside position for orphaned lis */
li {
list-style-position: inside;
}
/* restore outside position for lists inside LIs */
li ul, li ol, li dir, li menu {
list-style-position: outside;
}
/* undo previous two rules for properly nested lists */
ul ul, ul ol, ul dir, ul menu, ul li,
ol ul, ol ol, ol dir, ol menu, ol li,
dir ul, dir ol, dir dir, dir menu, dir li,
menu ul, menu ol, menu dir, menu menu, menu li {
list-style-position: inherit;
}
/* Quirk: ensure that we get proper padding if the very first
* node in an LI is another UL or OL. This is an ugly way to
* fix the problem, because it extends the LI up into what
* would otherwise appear to be the ULs space. (b=38832) */
/* Note: this fix will fail once we implement marker box
* alignment correctly. */
li > ul:first-node,
li > ol:first-node {
padding-top: 1em;
}
/* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
body > :first-node, td > :first-node {
margin-top: 0;
}
td > :last-node {
margin-bottom: 0;
}
/* Quirk: support the ways of making PRE have wrapping */
pre[wrap], pre[cols], pre[width] {
white-space: -moz-pre-wrap;
}
/* Quirk: text input has fixed look in compat mode (b=25580) */
input[type="text"] {
border: 2px inset ! important;
padding: 1px 0 0 0;
}
bug 14280 nsTextTransformer.cpp. I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account for the space as non-breaking and therefore part of the first word in the block. bug 39901 and 38396 nsHTMLImageLoader.*, nsImageFrame.cpp I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate bug that I'll file shortly. But this fixes the vast majority of real cases out there. bug 18754 nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach. bug 50257 nsLineLayout.cpp Did a couple of things in here: * The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line. A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a line. This is a wimpier, safer solution. * I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that. * I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly created object is a waste. nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-12 01:15:02 +04:00
/* Quirk: text inputs and textareas have special font (b=44656) */
/* dealt with at the code level */
/* Quirk: special margins for radio buttons */
input[type="radio"] {
margin: 2px 5px 4px 3px;
vertical-align: bottom;
}
/* Quirk: special margins for check boxes */
input[type="checkbox"] {
margin: 3px 4px 3px 3px;
vertical-align: bottom;
}
button,
input[type="reset"],
input[type="button"],
input[type="submit"] {
vertical-align: bottom;
}
/* Quirk: special top and bottom margins for inputs in tables */
td select[size] {
margin-top: 0px;
margin-bottom: 1px;
}
td select, td select[size="1"] {
margin-top: 2px;
margin-bottom: 2px;
}
td input[type="text"], input[type="password"] {
margin-top: 1px;
margin-bottom: 1px;
}
td input[type="checkbox"],
td input[type="radio"] {
margin-bottom: 1px;
}
td textarea {
margin-top: 1px;
margin-bottom: 2px;
}
/* Quirk: HRs avoid floats (b=18754) */
bug 14280 nsTextTransformer.cpp. I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account for the space as non-breaking and therefore part of the first word in the block. bug 39901 and 38396 nsHTMLImageLoader.*, nsImageFrame.cpp I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate bug that I'll file shortly. But this fixes the vast majority of real cases out there. bug 18754 nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach. bug 50257 nsLineLayout.cpp Did a couple of things in here: * The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line. A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a line. This is a wimpier, safer solution. * I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that. * I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly created object is a waste. nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-12 01:15:02 +04:00
hr {
display: inline;
-moz-box-sizing: border-box;
bug 14280 nsTextTransformer.cpp. I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account for the space as non-breaking and therefore part of the first word in the block. bug 39901 and 38396 nsHTMLImageLoader.*, nsImageFrame.cpp I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate bug that I'll file shortly. But this fixes the vast majority of real cases out there. bug 18754 nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach. bug 50257 nsLineLayout.cpp Did a couple of things in here: * The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line. A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a line. This is a wimpier, safer solution. * I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that. * I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly created object is a waste. nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-12 01:15:02 +04:00
}
hr:before {
bug 14280 nsTextTransformer.cpp. I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account for the space as non-breaking and therefore part of the first word in the block. bug 39901 and 38396 nsHTMLImageLoader.*, nsImageFrame.cpp I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate bug that I'll file shortly. But this fixes the vast majority of real cases out there. bug 18754 nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach. bug 50257 nsLineLayout.cpp Did a couple of things in here: * The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line. A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a line. This is a wimpier, safer solution. * I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that. * I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly created object is a waste. nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-12 01:15:02 +04:00
white-space: pre;
content: "\A";
}
hr:after {
bug 14280 nsTextTransformer.cpp. I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account for the space as non-breaking and therefore part of the first word in the block. bug 39901 and 38396 nsHTMLImageLoader.*, nsImageFrame.cpp I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate bug that I'll file shortly. But this fixes the vast majority of real cases out there. bug 18754 nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach. bug 50257 nsLineLayout.cpp Did a couple of things in here: * The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line. A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a line. This is a wimpier, safer solution. * I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that. * I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly created object is a waste. nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-12 01:15:02 +04:00
white-space: pre;
content: "\A";
}
/* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
:not(dl) > dd {
display: inline;
margin: 0;
}
:not(dl) > dd:before {
display: inline;
white-space: pre;
font-size: 1px;
line-height: 0;
content: "\A ";
margin-right: 40px;
}
/* Quirk: MAP acts like an inline, not a block */
map {
display: inline;
}
/* Quirk: Make floated images have a margin (b=58899) */
img[align=left] {
margin-right: 3px;
}
img[align=right] {
margin-left: 3px;
}
/* Quirk: Make sure that the residual style tags' size info.
* does not take precedence over heading tags' size. (b=77352)
* Note: This special attribute is set only for a residual
* style tag within a heading tag.
*/
*[_moz-rs-heading] {
font-size: inherit !important;
}