popup.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. :root {
  2. --header-width: 280px;
  3. --checkbox-width: 24px;
  4. --name-padding-left: 40px;
  5. --name-padding-right: 40px;
  6. --actions-width: 75px;
  7. --onoffswitch-width: 60px;
  8. }
  9. html, body {
  10. height: min-content;
  11. }
  12. body {
  13. width: 252px;
  14. font-size: 12px;
  15. font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  16. margin: 0;
  17. }
  18. .firefox body {
  19. background-color: #fff;
  20. color: #000;
  21. }
  22. body > div:not(#installed):not(#message-box):not(.colorpicker-popup) {
  23. margin-left: 9px;
  24. margin-right: 9px;
  25. }
  26. .firefox .chromium-only {
  27. display: none;
  28. }
  29. /************ checkbox ************/
  30. .style-name:hover input[type="checkbox"]:checked {
  31. border-color: hsl(0, 0%, 32%);
  32. background-color: hsl(0, 0%, 82%);
  33. }
  34. .style-name:hover input[type="checkbox"] {
  35. border-color: hsl(0, 0%, 32%);
  36. background-color: hsl(0, 0%, 82%);
  37. }
  38. #disable-all-wrapper input[type="checkbox"]:not(.slider):checked + .svg-icon.checked {
  39. position: absolute;
  40. top: 0;
  41. left: 0;
  42. pointer-events: none;
  43. }
  44. #installed.disabled + .actions #disableAll:checked + .svg-icon.checked {
  45. fill: hsl(0, 68%, 42%);
  46. }
  47. #installed.disabled + .actions #disableAll:checked {
  48. border-color: hsl(0, 68%, 50%);
  49. }
  50. #installed.disabled + .actions #disableAll:checked:hover + .svg-icon.checked {
  51. fill: #fff;
  52. }
  53. #disableAll:hover {
  54. border-color: hsl(0, 68%, 50%);
  55. background-color: hsl(20, 70%, 75%);
  56. }
  57. #disableAll-label:hover {
  58. color: hsl(0, 68%, 42%);
  59. }
  60. #installed.disabled + .actions #disableAll:checked:hover {
  61. border-color: hsl(0, 50%, 56%);
  62. background-color: hsl(0, 50%, 56%);
  63. }
  64. #installed .style-name .checker,
  65. #installed .style-name .svg-icon.checked {
  66. position: absolute;
  67. top: 7px;
  68. left: 9px;
  69. pointer-events: none;
  70. }
  71. #disable-all-wrapper {
  72. padding: 0.3em 0 0.6em;
  73. }
  74. #disable-all-wrapper .main-controls {
  75. display: flex;
  76. position: relative;
  77. }
  78. #disable-all-wrapper .main-controls label {
  79. padding-left: 16px;
  80. position: relative;
  81. transition: color .25s;
  82. font-size: 12px;
  83. }
  84. #no-styles {
  85. font-style: italic;
  86. }
  87. .checker {
  88. display: inline;
  89. }
  90. a {
  91. color: #000;
  92. transition: color .5s;
  93. text-decoration-skip: ink;
  94. }
  95. a:hover {
  96. color: #666;
  97. }
  98. .actions > .main-controls {
  99. padding-left: 16px;
  100. }
  101. .main-controls {
  102. display: table-cell;
  103. }
  104. body > DIV:last-of-type,
  105. body.blocked > DIV {
  106. border-bottom: none;
  107. }
  108. #installed {
  109. border-bottom: 1px solid black;
  110. padding-bottom: 2px;
  111. padding-top: 2px;
  112. max-height: 445px;
  113. overflow-y: auto;
  114. counter-reset: style-number;
  115. }
  116. #installed.disabled .style-name {
  117. text-decoration: line-through;
  118. }
  119. #installed.disabled + .actions #disableAll-label {
  120. font-weight: bold;
  121. color: firebrick;
  122. }
  123. #installed .actions {
  124. cursor: default;
  125. }
  126. #installed .actions a {
  127. cursor: pointer;
  128. text-decoration: none;
  129. }
  130. /* entry */
  131. .entry {
  132. display: flex;
  133. align-items: center;
  134. height: 26px;
  135. padding: 0 14px 0 0;
  136. position: relative;
  137. }
  138. html[style] .entry {
  139. padding: 0 16px 0 0;
  140. }
  141. #no-styles.entry {
  142. padding: 0 14px;
  143. }
  144. html[style] .entry:nth-child(-n+10):before,
  145. html[style] .entry:nth-child(10):before {
  146. right: 7px;
  147. }
  148. .entry .actions {
  149. display: inline-flex;
  150. }
  151. .style-name {
  152. height: 100%;
  153. width: 100%;
  154. line-height: 28px;
  155. cursor: default;
  156. font-weight: bold;
  157. overflow: hidden;
  158. text-overflow: ellipsis;
  159. white-space: nowrap;
  160. padding-left: 26px;
  161. position: relative;
  162. }
  163. .entry .main-controls {
  164. height: 100%;
  165. display: inline-flex;
  166. flex-grow: 1;
  167. overflow: hidden;
  168. align-items: center;
  169. padding-right: 5px;
  170. }
  171. .entry:nth-child(even) {
  172. background-color: rgba(0, 0, 0, 0.05);
  173. }
  174. .entry:nth-child(-n+10):before,
  175. .entry:nth-child(10):before {
  176. counter-increment: style-number;
  177. content: counter(style-number);
  178. position: absolute;
  179. top: .9ex;
  180. right: 5px;
  181. color: #aaa;
  182. }
  183. .entry:nth-child(10):before {
  184. content: "0";
  185. }
  186. .entry .actions {
  187. margin-left: -1px;
  188. margin-right: -1px;
  189. }
  190. .entry .actions > * {
  191. display: inline-block;
  192. padding: 0 1px;
  193. margin: 0 1px;
  194. }
  195. .not-applied .checker,
  196. .not-applied .style-name,
  197. .not-applied .actions > * {
  198. opacity: .2;
  199. transition: opacity .5s ease-in-out .25s, color .5s ease-in-out .25s;
  200. }
  201. .not-applied:hover .checker,
  202. .not-applied:hover .style-name,
  203. .not-applied:hover .actions > * {
  204. opacity: 1;
  205. }
  206. .not-applied:hover .style-name {
  207. color: darkred;
  208. }
  209. .regexp-problem-indicator {
  210. background-color: #d00;
  211. width: 14px;
  212. height: 14px;
  213. line-height: 15px;
  214. border-radius: 8px;
  215. margin-right: 6px;
  216. margin-left: 6px;
  217. text-align: center;
  218. color: white;
  219. font-weight: bold;
  220. box-sizing: border-box;
  221. cursor: pointer;
  222. font-size: 90%;
  223. }
  224. .regexp-partial .actions,
  225. .regexp-invalid .actions {
  226. order: 2;
  227. }
  228. #regexp-explanation {
  229. position: fixed;
  230. background-color: white;
  231. left: 0;
  232. right: 0;
  233. padding: .5rem;
  234. font-size: 90%;
  235. border-top: 2px solid black;
  236. border-bottom: 2px solid black;
  237. box-shadow: 0 0 100px black;
  238. display: flex;
  239. flex-direction: column;
  240. z-index: 999999;
  241. }
  242. #regexp-explanation > div {
  243. display: none;
  244. list-style-type: none;
  245. padding: 0;
  246. margin: 0;
  247. }
  248. .regexp-partial #regexp-partial,
  249. .regexp-invalid #regexp-invalid {
  250. display: block;
  251. }
  252. #regexp-explanation > div:not(:last-child) {
  253. margin-bottom: .5rem;
  254. }
  255. .svg-icon {
  256. pointer-events: none;
  257. transition: fill .5s;
  258. width: 14px;
  259. height: 16px;
  260. fill: #666;
  261. }
  262. a:hover .svg-icon {
  263. fill: #000;
  264. }
  265. body > .actions {
  266. margin-top: 0.5em;
  267. /* raise the actions above the hotkey-info */
  268. position: relative;
  269. z-index: 4;
  270. }
  271. .actions > div:not(:last-child):not(#disable-all-wrapper),
  272. .actions > .main-controls > div:not(:last-child) {
  273. margin-bottom: 0.75em;
  274. }
  275. .actions input,
  276. .actions label {
  277. vertical-align: middle;
  278. }
  279. body.blocked #installed > *,
  280. body.blocked .actions > .main-controls {
  281. display: none;
  282. }
  283. /* Never shown, but can be enabled with a style */
  284. .entry .actions > .enable,
  285. .entry .actions > .disable {
  286. display: none;
  287. }
  288. /* 'New style' links */
  289. #write-style {
  290. display: flex;
  291. flex-direction: row;
  292. flex-wrap: wrap;
  293. }
  294. #write-style-for {
  295. margin-right: .6ex
  296. }
  297. .write-style-link {
  298. margin-left: .6ex
  299. }
  300. .write-style-link::before {
  301. content: "\00ad"; /* "soft" hyphen */
  302. }
  303. #match {
  304. overflow-wrap: break-word;
  305. display: block;
  306. flex-grow: 9;
  307. min-width: 200px;
  308. }
  309. /* "breadcrumbs" 'new style' links */
  310. .breadcrumbs > .write-style-link {
  311. margin-left: 0
  312. }
  313. .breadcrumbs:hover a {
  314. color: #bbb;
  315. text-decoration: none
  316. }
  317. /* "dot" after each subdomain name */
  318. .breadcrumbs > .write-style-link[subdomain]::after {
  319. content: "."
  320. }
  321. /* no "dot" after top-level domain */
  322. .breadcrumbs > .write-style-link:nth-last-child(2)::after {
  323. content: none
  324. }
  325. /* "forward slash" before path ("this URL") */
  326. .breadcrumbs > .write-style-link:last-child::before {
  327. content: "\200b/"
  328. }
  329. .breadcrumbs > .write-style-link:last-child:first-child::before,
  330. .breadcrumbs > .write-style-link[subdomain=""] + .write-style-link::before {
  331. content: none
  332. }
  333. /* suppress TLD-only link */
  334. .breadcrumbs > .write-style-link[subdomain=""] {
  335. display: none
  336. }
  337. /* :hover style */
  338. .breadcrumbs.url\(\) > .write-style-link,
  339. /* :hover or :focus on "this URL" sets class="url()" */
  340. .breadcrumbs > .write-style-link:hover,
  341. .breadcrumbs > .write-style-link:focus,
  342. .breadcrumbs > .write-style-link:hover ~ .write-style-link[subdomain],
  343. .breadcrumbs > .write-style-link:focus ~ .write-style-link[subdomain] {
  344. color: inherit;
  345. text-decoration: underline;
  346. text-decoration-skip: ink;
  347. }
  348. /* action buttons */
  349. #popup-options {
  350. display: flex;
  351. flex-direction: row;
  352. justify-content: space-between;
  353. padding: 1.2em 1px;
  354. }
  355. #popup-options button {
  356. width: 32%;
  357. white-space: nowrap;
  358. overflow: hidden;
  359. text-overflow: ellipsis;
  360. }
  361. .firefox #popup-options button {
  362. width: 49%;
  363. }
  364. /* confirm */
  365. #confirm {
  366. align-items: center;
  367. justify-content: center;
  368. z-index: 2147483647;
  369. display: none;
  370. position: absolute;
  371. left: 0;
  372. top: 0;
  373. width: 100%;
  374. height: 100%;
  375. margin: 0 !important;
  376. box-sizing: border-box;
  377. background-color: rgba(0, 0, 0, 0.4);
  378. animation: lights-off .5s cubic-bezier(.03, .67, .08, .94);
  379. animation-fill-mode: both;
  380. }
  381. #confirm.lights-on {
  382. animation: lights-on .25s ease-in-out;
  383. animation-fill-mode: both;
  384. }
  385. #confirm.lights-on,
  386. #confirm.lights-on > div {
  387. display: none;
  388. }
  389. #confirm[data-display=true] {
  390. display: flex;
  391. }
  392. #confirm > div {
  393. width: 80%;
  394. max-height: 80%;
  395. min-height: 6em;
  396. padding: 1em;
  397. background-color: #fff;
  398. display: flex;
  399. flex-direction: column;
  400. border: solid 2px rgba(0, 0, 0, 0.5);
  401. }
  402. #confirm > div > *:not(:last-child) {
  403. padding-bottom: .5em;
  404. }
  405. #confirm > div > div {
  406. text-align: center;
  407. }
  408. .non-windows #confirm > div > div {
  409. direction: rtl;
  410. text-align: right;
  411. }
  412. #confirm > button {
  413. /* add a gap between buttons both for horizontal
  414. or vertical (when the label is wide) layout */
  415. margin: 0 .25em .25em 0;
  416. }
  417. .unreachable .entry {
  418. opacity: .25;
  419. }
  420. .unreachable .blocked-info {
  421. border-bottom: 1px solid black;
  422. }
  423. .blocked-info {
  424. hyphens: auto;
  425. }
  426. .blocked-info label {
  427. padding: 5px 0;
  428. display: block;
  429. font-weight: bold;
  430. }
  431. .blocked-info p {
  432. padding: 1px 0 9px;
  433. display: block;
  434. font-size: 90%;
  435. margin: 0;
  436. }
  437. /******************************************/
  438. #hotkey-info {
  439. position: absolute;
  440. top: 0;
  441. right: 0;
  442. bottom: 0;
  443. width: 16px;
  444. cursor: help;
  445. margin: 0;
  446. padding: 0;
  447. z-index: 1;
  448. hyphens: auto;
  449. }
  450. #hotkey-info:not([data-active]) > * {
  451. display: none;
  452. }
  453. #hotkey-info[data-active] {
  454. left: 6ex;
  455. width: auto;
  456. cursor: auto;
  457. display: flex;
  458. flex-direction: column;
  459. border-left: 2px solid white;
  460. box-shadow: 0 0 90px rgba(0, 0, 0, .5);
  461. z-index: 5;
  462. }
  463. #hotkey-info div:first-child {
  464. flex-grow: 1;
  465. padding: 0 1em;
  466. font-size: 11px;
  467. overflow-y: auto;
  468. }
  469. #hotkey-info div {
  470. padding: 1em;
  471. border-top: 1px solid #ddd;
  472. background-color: white;
  473. }
  474. #hotkey-info div:last-child {
  475. box-shadow: 0 0 90px rgba(0, 0, 0, .25);
  476. position: relative;
  477. }
  478. #hotkey-info p {
  479. text-indent: -3px;
  480. }
  481. #hotkey-info p:last-child {
  482. margin-bottom: 0;
  483. }
  484. #hotkey-info mark {
  485. display: inline-block;
  486. background: linear-gradient(#ccc, #fff);
  487. padding: 1px 6px 0;
  488. margin: 2px;
  489. border: 1px solid white;
  490. border-radius: 4px;
  491. box-shadow: 1px 1px 4px rgba(0, 0, 0, .3);
  492. font-weight: bold;
  493. white-space: nowrap;
  494. }
  495. /******************************************/
  496. @keyframes lights-off {
  497. from {
  498. background-color: transparent;
  499. }
  500. to {
  501. background-color: rgba(0, 0, 0, 0.4);
  502. }
  503. }
  504. @keyframes lights-on {
  505. from {
  506. background-color: rgba(0, 0, 0, 0.4);
  507. }
  508. to {
  509. background-color: transparent;
  510. }
  511. }
  512. /* Popup adjustments for common zoom levels */
  513. @media (-webkit-min-device-pixel-ratio: 1.05) {
  514. #installed {
  515. max-height: 420px;
  516. }
  517. }
  518. @media (-webkit-min-device-pixel-ratio: 1.1) {
  519. #installed {
  520. max-height: 393px;
  521. }
  522. }
  523. @media (-webkit-min-device-pixel-ratio: 1.15) {
  524. #installed {
  525. max-height: 371px;
  526. }
  527. }
  528. @media (-webkit-min-device-pixel-ratio: 1.2) {
  529. #installed {
  530. max-height: 348px;
  531. }
  532. }
  533. @media (-webkit-min-device-pixel-ratio: 1.25) {
  534. #installed {
  535. max-height: 326px;
  536. }
  537. }
  538. @media (-webkit-min-device-pixel-ratio: 1.30) {
  539. #installed {
  540. max-height: 306px;
  541. }
  542. }
  543. @media (-webkit-min-device-pixel-ratio: 1.35) {
  544. #installed {
  545. max-height: 288px;
  546. }
  547. }
  548. @media (-webkit-min-device-pixel-ratio: 1.4) {
  549. #installed {
  550. max-height: 271px;
  551. }
  552. }
  553. @media (-webkit-min-device-pixel-ratio: 1.45) {
  554. #installed {
  555. max-height: 256px;
  556. }
  557. }
  558. @media (-webkit-min-device-pixel-ratio: 1.5) {
  559. #installed {
  560. max-height: 244px;
  561. }
  562. }
  563. @media (-webkit-min-device-pixel-ratio: 1.55) {
  564. #installed {
  565. max-height: 199px;
  566. }
  567. }
  568. @media (-webkit-min-device-pixel-ratio: 1.75) {
  569. #installed {
  570. max-height: 144px;
  571. }
  572. }