popup.css 8.2 KB

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