-
Notifications
You must be signed in to change notification settings - Fork 1
/
webext-base.css
135 lines (115 loc) · 2.94 KB
/
webext-base.css
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
/*! https://npm.im/webext-base-css */
/* Firefox only: @-moz-document */
/* Firefox only: var(--in-content-*) */
/* Chrome only: -webkit-hyphens */
/* Safari only: _::-webkit-full-page-media */
/* webpackIgnore: true */
@import url('chrome://global/skin/in-content/common.css') (min--moz-device-pixel-ratio:0); /* Firefox-only */
:root {
--background-color-for-chrome: #292a2d;
max-width: 700px;
margin: auto;
}
body {
--body-margin-h: 8px;
margin-left: var(--body-margin-h);
margin-right: var(--body-margin-h);
}
/* Selector matches Firefox’ */
input[type='number'],
input[type='password'],
input[type='search'],
input[type='text'],
input[type='url'],
input:not([type]),
textarea {
display: block;
box-sizing: border-box;
margin-left: 0;
width: 100%;
resize: vertical;
-moz-tab-size: 4 !important;
tab-size: 4 !important;
}
input[type='checkbox'] {
vertical-align: -0.15em;
}
@supports (not (-webkit-hyphens:none)) and (not (-moz-appearance:none)) and (list-style-type:'*') {
textarea:focus {
/* Inexplicably missing from Chrome’s input style https://github.com/chromium/chromium/blob/6bea0557fe/extensions/renderer/resources/extension.css#L287 */
border-color: #4d90fe;
transition: border-color 200ms;
}
}
hr {
margin-right: calc(-1 * var(--body-margin-h));
margin-left: calc(-1 * var(--body-margin-h));
border: none;
border-bottom: 1px solid #aaa4;
}
img {
vertical-align: middle;
}
_::-webkit-full-page-media,
_:future,
:root {
font-family: -apple-system, BlinkMacSystemFont, sans-serif, 'Apple Color Emoji';
}
_::-webkit-full-page-media,
_:future,
input[type='number'],
input[type='password'],
input[type='search'],
input[type='text'],
input[type='url'],
input:not([type]),
textarea {
border: solid 1px #888;
padding: 0.4em;
font: inherit;
-webkit-appearance: none;
}
@-moz-document url-prefix('') {
:root, /* Visible on a options_page */
body {
--body-margin-h: 6px; /* Must be a variable so <hr>’s margin is changed too */ /* Visible on a options_page and options_ui */
color: var(--in-content-page-color);
/* Also supports dark themes in Firefox */
/* !important is to override the dark-mode setting for Chrome below */
background-color: var(--in-content-box-background) !important;
min-height: 250px; /* Without this there’s a white space at the bottom in dark mode */
}
body > * {
margin-left: var(--body-margin-h);
margin-right: var(--body-margin-h);
}
input[type='checkbox'] {
vertical-align: -0.4em;
}
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
background-color: var(--background-color-for-chrome);
}
body,
h3 { /* Chrome #3 */
color: var(--in-content-page-color, #e8eaed);
}
a {
color: var(--link-color, #8ab4f8);
}
a:active {
color: var(--link-color-active, #b6d3f9);
}
input[type='number'],
input[type='password'],
input[type='search'],
input[type='text'],
input[type='url'],
input:not([type]),
textarea {
color: inherit;
background-color: transparent;
}
}