1
0

install-usercss.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. body {
  2. overflow: hidden;
  3. margin: 0;
  4. background: white;
  5. }
  6. a {
  7. color: #000;
  8. transition: color .5s;
  9. }
  10. a:hover {
  11. color: #666;
  12. }
  13. img.icon {
  14. height: 1.4em;
  15. vertical-align: middle;
  16. }
  17. input:disabled + span {
  18. color: rgb(128, 128, 128);
  19. }
  20. .container {
  21. display: flex;
  22. height: 100vh;
  23. }
  24. #header,
  25. .warnings {
  26. flex: 0 0 280px;
  27. box-sizing: border-box;
  28. padding: 1rem;
  29. border-right: 1px dashed #aaa;
  30. box-shadow: 0 0 50px -18px black;
  31. overflow-wrap: break-word;
  32. overflow-y: auto;
  33. z-index: 100;
  34. }
  35. #header.meta-init-error {
  36. display: none;
  37. }
  38. .warnings {
  39. display: none;
  40. padding-bottom: 0;
  41. flex-basis: auto;
  42. background: #ffe2e2;
  43. border-right: none;
  44. border-bottom: 1px dashed #aaa;
  45. }
  46. .has-warnings .warnings {
  47. display: flex;
  48. }
  49. .warning {
  50. font-weight: bold;
  51. font-size: 125%;
  52. margin-bottom: 1em;
  53. }
  54. .warning pre {
  55. overflow-wrap: break-word;
  56. white-space: pre-wrap;
  57. margin: 1ex 0 0;
  58. font-family: monospace;
  59. font-weight: normal;
  60. font-size: 80%;
  61. }
  62. h1 {
  63. margin-top: 0;
  64. }
  65. h1 small {
  66. font-size: 0.6em;
  67. }
  68. .meta-version::before {
  69. content: " v";
  70. }
  71. .actions {
  72. margin-bottom: 1em;
  73. }
  74. .actions label {
  75. max-width: -moz-fit-content;
  76. max-width: fit-content;
  77. display: flex;
  78. align-items: center;
  79. margin: 0.5em 0;
  80. }
  81. .install {
  82. font-family: Arial, "DejaVu Sans", Verdana, Geneva, sans-serif;
  83. font-size: 14px;
  84. background-color: hsl(0, 0%, 33%);
  85. color: #eee;
  86. border-radius: 4px;
  87. padding: 4px 38px 4px 10px;
  88. position: relative;
  89. display: inline-block;
  90. text-shadow: 1px 1px 1px #333;
  91. -webkit-appearance: none;
  92. -moz-appearance: none;
  93. border-style: none;
  94. margin-bottom: 1ex;
  95. cursor: pointer;
  96. box-shadow: inset 0 -1px 0 0 hsl(0, 0%, 24%), inset 0 1px 0 0 hsl(0, 0%, 30%), inset 1px 0 0 0 hsl(0, 0%, 24%);
  97. transition: color .25s, background-color .25s;
  98. }
  99. .install,
  100. .install:before {
  101. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAeCAYAAAAGos/EAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gINFiccyZ2qfAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAb0lEQVQY012OwQ3CUAzFnNeMAfsv1hk4VDTm0H6ByMmyLL2U+lRowKobwAVFEEWbwqKIIGDXBTQqBU3VbWYk0CTLIAxNEHI1s5oAYXAYm2AIfZ64Ab1ta4s/yHv908twHB5gqf0Tvyg1l9l3efC9Dw0XRC2vHIXXAAAAAElFTkSuQmCC);
  102. background-size: 100% 100%;
  103. background-repeat: repeat-x;
  104. }
  105. .install:hover:not(:disabled) {
  106. background-color: hsl(0, 0%, 38%);
  107. color: #fff;
  108. text-shadow: none;
  109. }
  110. .install:before,
  111. .install:after {
  112. content: "";
  113. vertical-align: middle;
  114. box-sizing: border-box;
  115. border-radius: 0 4px 4px 0;
  116. position: absolute;
  117. right: 0;
  118. top: 0;
  119. bottom: 0;
  120. width: 30px;
  121. }
  122. .install:before {
  123. border-left: 1px solid rgba(0, 0, 0, .3);
  124. box-shadow: inset 0 -1px 0 0 hsl(0, 0%, 24%), inset 0 1px 0 0 hsl(0, 0%, 30%), inset -1px 0 0 0 hsl(0, 0%, 38%);
  125. padding: 5px 8px;
  126. transition: background-color .25s;
  127. }
  128. .install:before,
  129. .install:active:before,
  130. .install:active:hover:before {
  131. background-color: hsl(176, 50%, 35%);
  132. }
  133. .install:hover:before {
  134. background-color: hsl(176, 50%, 40%);
  135. }
  136. .install:active,
  137. .install:active:before {
  138. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAeCAYAAAAGos/EAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gINFioX6+ENuQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAc0lEQVQY003OwQ0CQQxD0edsRBX03xg9cFjBhMPuSOT0ZdmxuS/zesWTzExBI7xlZhrKeeYkmZkH1Icg3Rfs1D98v3Kgj+NSypJlpZWU0tbKKlpVCm0JSyuxPbbnqpiJ0JLr8+w9sbtGxqRFInvYbLiVGX46ECZMv8VvjwAAAABJRU5ErkJggg==);
  139. background-size: 100% 100%;
  140. background-repeat: repeat-x;
  141. }
  142. .install:active,
  143. .install:active:hover {
  144. background-color: hsl(0, 0%, 33%);
  145. }
  146. .install:after {
  147. background-image: url(../images/icon/16.png);
  148. background-repeat: no-repeat;
  149. background-position: center center;
  150. }
  151. .install:disabled {
  152. opacity: .25;
  153. color: white;
  154. cursor: auto;
  155. }
  156. .install.reinstall:after {
  157. filter: grayscale(100%);
  158. }
  159. .install.reinstall:before,
  160. .install.reinstall:active:before,
  161. .install.reinstall:active:hover:before {
  162. background-color: hsl(0, 0%, 20%);
  163. }
  164. .install.reinstall:hover:before {
  165. background-color: hsl(0, 0%, 25%);
  166. }
  167. .install.reinstall:hover:before {
  168. background-color: #444;
  169. }
  170. .install.update:before,
  171. .install.update:active:before,
  172. .install.update:active:hover:before {
  173. background-color: hsl(140, 100%, 13%);
  174. }
  175. .install.update:hover:before {
  176. background-color: hsl(140, 100%, 18%);
  177. }
  178. .install.update:after {
  179. filter: hue-rotate(-18deg) brightness(.7) contrast(2);
  180. }
  181. .install.installed {
  182. display: none;
  183. }
  184. h2.installed.active {
  185. display: inline-block;
  186. font-weight: bold;
  187. margin-top: 0;
  188. color: darkcyan;
  189. }
  190. h2.installed.active ~ .configure-usercss svg {
  191. fill: hsl(180, 100%, 20%);
  192. }
  193. h2.installed.active ~ .configure-usercss:hover svg {
  194. fill: hsl(180, 100%, 30%);
  195. }
  196. .actions label input {
  197. margin: 0 0.5em 0 0;
  198. flex: 0 0 auto;
  199. }
  200. .actions label span {
  201. min-width: 0;
  202. }
  203. .set-update-url {
  204. flex-wrap: wrap;
  205. }
  206. .set-update-url p {
  207. word-break: break-all;
  208. opacity: .5;
  209. width: 100%;
  210. margin: .25em 0 .25em;
  211. }
  212. label.set-prefer-scheme:not(.unavailable) {
  213. padding-left: 0;
  214. }
  215. .external {
  216. text-align: center;
  217. }
  218. .external > * {
  219. margin: 0 7.5px;
  220. }
  221. li {
  222. margin-left: -2em;
  223. }
  224. .main {
  225. overflow: hidden;
  226. }
  227. .main,
  228. .main .CodeMirror {
  229. height: 100% !important;
  230. width: 100% !important;
  231. border: none;
  232. }
  233. /* spinner-related */
  234. #header {
  235. position: relative;
  236. }
  237. #header:not(.meta-init) > *:not(.lds-spinner),
  238. #header.meta-init > .lds-spinner {
  239. -moz-user-select: none;
  240. user-select: none;
  241. pointer-events: none;
  242. opacity: 0;
  243. }
  244. #header.meta-init > * {
  245. opacity: 1;
  246. transition: opacity .5s;
  247. -moz-user-select: auto;
  248. user-select: auto;
  249. }
  250. #header.meta-init[data-arrived-fast="true"] > * {
  251. transition-duration: .1s;
  252. }
  253. label {
  254. /* FIXME: why do we want to give all labels a padding? */
  255. padding-left: 16px;
  256. position: relative;
  257. }
  258. .lds-spinner {
  259. top: 50px;
  260. opacity: .2;
  261. transition: opacity .5s;
  262. animation: none;
  263. }
  264. .configure-usercss .svg-icon.config {
  265. width: 20px;
  266. height: 20px;
  267. margin-top: -3px;
  268. }
  269. #message-box.config-dialog {
  270. width: 0;
  271. height: 0;
  272. background: none;
  273. }
  274. #message-box.config-dialog > div {
  275. box-shadow: 5px 5px 50px rgba(0, 0, 0, 0.75); /* copied from message-box.css + darkened the color */
  276. }
  277. /************ reponsive layouts ************/
  278. @media (max-width: 850px) {
  279. body {
  280. overflow: hidden;
  281. }
  282. .container {
  283. flex-direction: column;
  284. }
  285. #header {
  286. flex: 0 1 auto;
  287. border-right: none;
  288. border-bottom: 1px dashed #AAA;
  289. overflow-x: auto;
  290. overflow-y: hidden;
  291. padding: 0;
  292. }
  293. #header:not(.meta-init) {
  294. min-height: 300px;
  295. }
  296. .main {
  297. flex: 1;
  298. }
  299. #header-content-wrapper {
  300. display: flex;
  301. flex-wrap: wrap;
  302. padding: .5rem 0 0 1rem;
  303. box-sizing: border-box;
  304. height: min-content;
  305. }
  306. #header-content-wrapper > * {
  307. flex-grow: 1;
  308. margin: 0;
  309. padding: 0 1rem .5rem 0;
  310. min-width: 0;
  311. }
  312. #header-content-wrapper > .meta-description + .flex-wrapper {
  313. display: flex;
  314. justify-content: space-between;
  315. flex-wrap: wrap;
  316. padding: 0;
  317. }
  318. #header-content-wrapper > .meta-description + .flex-wrapper > * {
  319. display: flex;
  320. flex-direction: column;
  321. flex: 1;
  322. flex-wrap: wrap;
  323. white-space: nowrap;
  324. padding: 0 1rem .5rem 0;
  325. box-sizing: border-box;
  326. }
  327. .flex-wrapper ul {
  328. margin: 0;
  329. }
  330. #header-content-wrapper > .meta-description {
  331. flex-basis: 100%;
  332. white-space: nowrap;
  333. overflow: hidden;
  334. text-overflow: ellipsis;
  335. }
  336. .actions {
  337. display: flex;
  338. flex-wrap: wrap;
  339. align-items: flex-start;
  340. }
  341. .set-update-url p {
  342. white-space: nowrap;
  343. overflow: hidden;
  344. text-overflow: ellipsis;
  345. }
  346. .actions label {
  347. min-width: 100px;
  348. flex: 1;
  349. }
  350. .actions label span {
  351. white-space: nowrap;
  352. }
  353. .has-warnings #header {
  354. min-height: 4em;
  355. max-height: 20%;
  356. }
  357. .warnings {
  358. max-height: 20%;
  359. }
  360. .warning:not(:last-child) {
  361. border-bottom: 1px dashed #b57c7c;
  362. padding-bottom: 1em;
  363. }
  364. ul.applies-to,
  365. .actions label {
  366. margin: 0;
  367. }
  368. #header-content-wrapper > h1 {
  369. font-size: 1.75em;
  370. display: flex;
  371. align-items: baseline;
  372. }
  373. #header-content-wrapper > h1 > .meta-version {
  374. padding-left: 3px;
  375. }
  376. #header-content-wrapper > h1 > .meta-name {
  377. white-space: nowrap;
  378. overflow: hidden;
  379. text-overflow: ellipsis;
  380. }
  381. #header-content-wrapper > * h3 {
  382. margin: 0 0 .5rem;
  383. }
  384. .install {
  385. flex-shrink: 0;
  386. margin-right: 1em;
  387. }
  388. #message-box.config-dialog > div {
  389. top: auto;
  390. bottom: 3rem;
  391. }
  392. }
  393. /* Retina-specific stuff here */
  394. @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  395. .install:after {
  396. background-image: url(../images/icon/32.png);
  397. background-size: 16px 16px;
  398. }
  399. }