1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
/* Display types for non-table items. */
ADDRESS, BLOCKQUOTE, BODY, DD, DIV, DL, DT, FIELDSET,
FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, NOFRAMES,
OL, P, UL, APPLET, CENTER, DIR, HR, MENU, PRE
{ display: block }
HEAD, SCRIPT, TITLE { display: none }
BODY { margin: 8px; }
/* Rules for unordered-lists */
LI { display: list-item }
UL[type="square"]>LI { list-style-type : square }
UL[type="disc"]>LI { list-style-type : disc }
UL[type="circle"]>LI { list-style-type : circle }
LI[type="circle"] { list-style-type : circle }
LI[type="square"] { list-style-type : square }
LI[type="disc"] { list-style-type : disc }
OL, UL, DIR, MENU, DD { padding-left: 40px ; margin-left: 1em }
NOBR {
white-space: nowrap;
}
/* Map the 'align' attribute to the 'float' property. Todo: This should
* only be done for images, tables etc. "align" can mean different things
* for different elements.
*/
TABLE[align="left"] { float:left }
TABLE[align="right"] { float:right }
TABLE[align="center"] {
margin-left:auto;
margin-right:auto;
text-align:left;
}
IMG[align="left"] { float:left }
IMG[align="right"] { float:right }
/* If the 'align' attribute was not mapped to float by the rules above, map
* it to 'text-align'. The rules above take precedence because of their
* higher specificity.
*
* Also the <center> tag means to center align things.
*/
[align="center"] { text-align:center }
[align="right"] { text-align:right }
[align="left"] { text-align:left }
CENTER { text-align: center }
/* Rules for unordered-lists */
/* Todo! */
TD, TH {
padding: 1px;
border-bottom-color: grey60;
border-right-color: grey60;
border-top-color: grey25;
border-left-color: grey25;
}
/* For a horizontal line, use a table with no content. We use a table
* instead of a block because tables are laid out around floating boxes,
* whereas regular blocks are not.
*/
/*
HR {
display: table;
border-top: 1px solid grey45;
background: grey80;
height: 1px;
width: 100%;
text-align: center;
margin: 0.5em 0;
}
*/
HR {
display: block;
border-top: 1px solid grey45;
border-bottom: 1px solid grey80;
margin: 0.5em auto 0.5em auto;
}
/* Basic table tag rules. */
TABLE {
display: table;
border-spacing: 2px;
border-bottom-color: grey25;
border-right-color: grey25;
border-top-color: grey60;
border-left-color: grey60;
}
TR { display: table-row }
THEAD { display: table-header-group }
TBODY { display: table-row-group }
TFOOT { display: table-footer-group }
COL { display: table-column }
COLGROUP { display: table-column-group }
TD, TH { display: table-cell }
CAPTION { display: table-caption }
TH { font-weight: bolder; text-align: center }
CAPTION { text-align: center }
H1 { font-size: 2em; margin: .67em 0 }
H2 { font-size: 1.5em; margin: .83em 0 }
H3 { font-size: 1.17em; margin: 1em 0 }
H4, P,
BLOCKQUOTE, UL,
FIELDSET,
OL, DL, DIR,
MENU { margin-top: 1.0em; margin-bottom: 1.0em }
H5 { font-size: .83em; line-height: 1.17em; margin: 1.67em 0 }
H6 { font-size: .67em; margin: 2.33em 0 }
H1, H2, H3, H4,
H5, H6, B,
STRONG { font-weight: bolder }
BLOCKQUOTE { margin-left: 40px; margin-right: 40px }
I, CITE, EM,
VAR, ADDRESS { font-style: italic }
PRE, TT, CODE,
KBD, SAMP { font-family: courier }
BIG { font-size: 1.17em }
SMALL, SUB, SUP { font-size: .83em }
SUB { vertical-align: sub }
SUP { vertical-align: super }
S, STRIKE, DEL { text-decoration: line-through }
OL { list-style-type: decimal }
OL UL, UL OL,
UL UL, OL OL { margin-top: 0; margin-bottom: 0 }
U, INS { text-decoration: underline }
ABBR, ACRONYM { font-variant: small-caps; letter-spacing: 0.1em }
/* Formatting for <pre> etc. */
PRE, PLAINTEXT, XMP {
display: block;
white-space: pre;
margin: 1em 0;
font-family: courier;
}
/* Display properties for hyperlinks */
:link { color: darkblue; text-decoration: underline }
/* Deal with the "nowrap" HTML attribute on table cells. */
TD[nowrap] , TH[nowrap] { white-space: nowrap; }
TD[nowrap="0"] , TH[nowrap="0"] { white-space: normal; }
BR {
display: block;
}
/* BR:before { content: "\A" } */
/*
* Default decorations for form items.
*/
INPUT[type="hidden"] { display: none }
INPUT[type] { border: none }
INPUT, INPUT[type="text"], INPUT[type="password"] {
border: 2px solid;
border-color: #848280 #faf9f7 #faf9f7 #848280;
}
FRAMESET {
display: none;
}
/*
*************************************************************************
* Below this point are stylesheet rules for mapping presentational
* attributes of Html to CSS property values. Strictly speaking, this
* shouldn't be specified here (in the UA stylesheet), but it doesn't matter
* in practice. See CSS 2.1 spec for more details.
*/
/* 'color' */
[color] { color: tcl(::tkhtml::attr color -color) }
body a[href]:link { color: tcl(::tkhtml::aa body link -color) }
body a[href]:visited { color: tcl(::tkhtml::aa body vlink -color) }
/* 'width', 'height', 'background-color' and 'font-size' */
[width] { width: tcl(::tkhtml::attr width -len) }
[height] { height: tcl(::tkhtml::attr height -len) }
basefont[size] { font-size: tcl(::tkhtml::attr size) }
font[size] { font-size: tcl(::tkhtml::attr size) }
[bgcolor] { background-color: tcl(::tkhtml::attr bgcolor -color) }
BR[clear] { clear: tcl(::tkhtml::attr clear) }
BR[clear="all"] { clear: both; }
/* Standard html <img> tags - replace the node with the image at url $src */
IMG[src] { -tkhtml-replacement-image: tcl(::tkhtml::attr src) }
/*
* Properties of table cells (th, td):
*
* 'border-width'
* 'border-style'
* 'padding'
* 'border-spacing'
*/
TABLE[border], TABLE[border] TD, TABLE[border] TH {
border-top-width: tcl(::tkhtml::aa table border -len);
border-right-width: tcl(::tkhtml::aa table border -len);
border-bottom-width: tcl(::tkhtml::aa table border -len);
border-left-width: tcl(::tkhtml::aa table border -len);
border-top-style: tcl(::tkhtml::aa table border -if solid);
border-right-style: tcl(::tkhtml::aa table border -if solid);
border-bottom-style: tcl(::tkhtml::aa table border -if solid);
border-left-style: tcl(::tkhtml::aa table border -if solid);
}
TABLE[border=""], TABLE[border=""] td, TABLE[border=""] th {
border-top-width: tcl(::tkhtml::aa table border -if 1px);
border-right-width: tcl(::tkhtml::aa table border -if 1px);
border-bottom-width: tcl(::tkhtml::aa table border -if 1px);
border-left-width: tcl(::tkhtml::aa table border -if 1px);
}
TABLE[cellpadding] td, TABLE[cellpadding] th {
padding-top: tcl(::tkhtml::aa table cellpadding -len);
padding-right: tcl(::tkhtml::aa table cellpadding -len);
padding-bottom: tcl(::tkhtml::aa table cellpadding -len);
padding-left: tcl(::tkhtml::aa table cellpadding -len);
}
TABLE[cellspacing], table[cellspacing] {
border-spacing: tcl(::tkhtml::attr cellspacing -len);
}
/* Map the valign attribute to the 'vertical-align' property for table
* cells. The default value is "middle", or use the actual value of
* valign if it is defined.
*/
TD,TH {vertical-align: middle}
TR[valign]>TD, TR[valign]>TH {vertical-align: tcl(::tkhtml::aa tr valign)}
TR>TD[valign], TR>TH[valign] {vertical-align: tcl(::tkhtml::attr valign)}
/* Support the "text" attribute on the <body> tag */
body[text] {color: tcl(::tkhtml::attr text -color)}
/* Allow background images to be specified using the "background" attribute.
* According to HTML 4.01 this is only allowed for <body> elements, but
* many websites use it arbitrarily.
*/
[background] {
background-image: tcl(format "url(%s)" [::tkhtml::attr background])
}
/* The vspace and hspace attributes map to margins for elements of type
* <IMG>, <OBJECT> and <APPLET> only. Note that this attribute is
* deprecated in HTML 4.01.
*/
IMG[vspace], OBJECT[vspace], APPLET[vspace] {
margin-top: tcl(::tkhtml::attr vspace -len);
margin-bottom: tcl(::tkhtml::attr vspace -len);
}
IMG[hspace], OBJECT[hspace], APPLET[hspace] {
margin-left: tcl(::tkhtml::attr hspace -len);
margin-right: tcl(::tkhtml::attr hspace -len);
}
|