mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Read user-agent.css at run time. Fix #3516
This commit is contained in:
parent
543f11b62b
commit
cf1785ecb1
6 changed files with 39 additions and 12 deletions
8
resources/failure.html
Normal file
8
resources/failure.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>about:failure</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="itried.jpg"/>
|
||||
</body>
|
||||
</html>
|
130
resources/user-agent.css
Normal file
130
resources/user-agent.css
Normal file
|
@ -0,0 +1,130 @@
|
|||
html, address,
|
||||
blockquote,
|
||||
body, div,
|
||||
dt, fieldset, form,
|
||||
frame, frameset,
|
||||
h1, h2, h3, h4,
|
||||
h5, h6, noframes,
|
||||
center, dir,
|
||||
hr, menu, pre { display: block; unicode-bidi: embed }
|
||||
head, noscript { display: none }
|
||||
table { display: table }
|
||||
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 }
|
||||
body { margin: 8px }
|
||||
h1 { font-size: 2em; margin: .67em 0 }
|
||||
h2 { font-size: 1.5em; margin: .75em 0 }
|
||||
h3 { font-size: 1.17em; margin: .83em 0 }
|
||||
h4,
|
||||
blockquote,
|
||||
fieldset, dir,
|
||||
menu { margin: 1.12em 0 }
|
||||
h5 { font-size: .83em; margin: 1.5em 0 }
|
||||
h6 { font-size: .75em; margin: 1.67em 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: monospace }
|
||||
pre { white-space: pre }
|
||||
button, textarea,
|
||||
input, select { display: inline-block }
|
||||
big { font-size: 1.17em }
|
||||
small, sub, sup { font-size: .83em }
|
||||
sub { vertical-align: sub }
|
||||
sup { vertical-align: super }
|
||||
table { border-spacing: 2px; }
|
||||
thead, tbody,
|
||||
tfoot { vertical-align: middle }
|
||||
td, th, tr { vertical-align: inherit }
|
||||
s, strike, del { text-decoration: line-through }
|
||||
hr { border: 1px inset }
|
||||
|
||||
/* lists */
|
||||
dd { display: block; margin-left: 40px }
|
||||
p, dl, multicol { display: block; margin: 1em 0 }
|
||||
ul { display: block; list-style-type: disc;
|
||||
margin: 1em 0; padding-left: 40px }
|
||||
|
||||
ol { display: block; list-style-type: decimal;
|
||||
margin: 1em 0; padding-left: 40px }
|
||||
|
||||
li { display: list-item }
|
||||
|
||||
/* nested lists have no top/bottom margins */
|
||||
ul ul, ul ol, ul dl,
|
||||
ol ul, ol ol, ol dl,
|
||||
dl ul, dl ol, dl dl { margin-top: 0; margin-bottom: 0 }
|
||||
|
||||
/* 2 deep unordered lists use a circle */
|
||||
ol ul, ul ul { list-style-type: circle; }
|
||||
|
||||
/* 3 deep (or more) unordered lists use a square */
|
||||
ol ol ul, ol ul ul,
|
||||
ul ol ul, ul ul ul { list-style-type: square; }
|
||||
|
||||
/* The type attribute on ol and ul elements */
|
||||
ul[type="disc"] { list-style-type: disc; }
|
||||
ul[type="circle"] { list-style-type: circle; }
|
||||
ul[type="square"] { list-style-type: square; }
|
||||
ol[type="1"] { list-style-type: decimal; }
|
||||
ol[type="a"] { list-style-type: lower-alpha; }
|
||||
ol[type="A"] { list-style-type: upper-alpha; }
|
||||
ol[type="i"] { list-style-type: lower-roman; }
|
||||
ol[type="I"] { list-style-type: upper-roman; }
|
||||
|
||||
u, ins { text-decoration: underline }
|
||||
br:before { content: "\A"; white-space: pre }
|
||||
|
||||
center { text-align: center }
|
||||
a:link,
|
||||
a:visited,
|
||||
area:link,
|
||||
area:visited,
|
||||
link:link,
|
||||
link:visited { text-decoration: underline }
|
||||
:focus { outline: thin dotted invert }
|
||||
|
||||
/* Begin bidirectionality settings (do not change) */
|
||||
BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override }
|
||||
BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override }
|
||||
|
||||
*[DIR="ltr"] { direction: ltr; unicode-bidi: embed }
|
||||
*[DIR="rtl"] { direction: rtl; unicode-bidi: embed }
|
||||
|
||||
@media print {
|
||||
h1 { page-break-before: always }
|
||||
h1, h2, h3,
|
||||
h4, h5, h6 { page-break-after: avoid }
|
||||
ul, ol, dl { page-break-before: avoid }
|
||||
}
|
||||
|
||||
/* Servo additions */
|
||||
a:link,
|
||||
area:link,
|
||||
link:link { color: blue }
|
||||
script { display: none }
|
||||
style { display: none }
|
||||
input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; }
|
||||
input[type="button"],
|
||||
input[type="submit"],
|
||||
input[type="reset"] { background: lightgrey; border-top: solid 1px #EEEEEE; border-left: solid 1px #CCCCCC; border-right: solid 1px #999999; border-bottom: solid 1px #999999; text-align: center; vertical-align: middle; color: black; }
|
||||
input[type="hidden"] { display: none !important }
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] { font-family: monospace !important; border: none !important; background: transparent; }
|
||||
|
||||
input[type="checkbox"]::before { content: "[ ]"; padding: 0; }
|
||||
input[type="checkbox"][checked]::before { content: "[✓]"; }
|
||||
input[type="radio"]::before { content: "( )"; padding: 0; }
|
||||
input[type="radio"][checked]::before { content: "(●)"; }
|
Loading…
Add table
Add a link
Reference in a new issue