edit.css 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. :root {
  2. --fixed-padding: unset;
  3. }
  4. body {
  5. margin: 0;
  6. height: 100vh;
  7. font: 12px arial,sans-serif;
  8. }
  9. a {
  10. color: #000;
  11. transition: color .5s;
  12. }
  13. a:hover {
  14. color: #666;
  15. }
  16. #global-progress {
  17. position: fixed;
  18. height: 4px;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. background-color: hsla(180, 66%, 36%, .25);
  23. border-left: 0 solid darkcyan;
  24. z-index: 2147483647;
  25. opacity: 0;
  26. transition: opacity 2s;
  27. contain: strict;
  28. }
  29. #global-progress[title] {
  30. opacity: 1;
  31. }
  32. html.is-new-style #preview-label,
  33. html.is-new-style #publish,
  34. .hidden {
  35. display: none !important;
  36. }
  37. html.is-new-style #heading::after {
  38. content: attr(data-add);
  39. }
  40. html:not(.is-new-style) #heading::after {
  41. content: attr(data-edit);
  42. }
  43. /************ embedded popup for simple-window editor ************/
  44. #popup-iframe {
  45. max-height: 600px;
  46. position: fixed;
  47. right: 0;
  48. top: 0;
  49. z-index: 1001;
  50. border: none;
  51. background: #fff;
  52. box-shadow: 0 0 30px #000;
  53. }
  54. #popup-iframe:not([data-loaded]) {
  55. opacity: 0;
  56. }
  57. #popup-button {
  58. position: fixed;
  59. right: 7px;
  60. top: 11px;
  61. z-index: 1000;
  62. cursor: pointer;
  63. transition: filter .25s;
  64. }
  65. #popup-button:hover {
  66. filter: drop-shadow(0 0 3px hsl(180, 70%, 50%));
  67. }
  68. .usercss body:not(.compact-layout) #popup-button {
  69. right: 24px;
  70. }
  71. /************ checkbox & select************/
  72. .options-column > div[class="option"] {
  73. margin-bottom: 4px;
  74. }
  75. .options-column > .usercss-only {
  76. margin-bottom: .75rem;
  77. }
  78. label {
  79. padding-left: 16px;
  80. position: relative;
  81. }
  82. input[type="checkbox"] {
  83. vertical-align: middle;
  84. }
  85. /************ header ************/
  86. #header {
  87. width: 280px;
  88. height: 100vh;
  89. overflow: auto;
  90. position: fixed;
  91. top: 0;
  92. padding: 1rem;
  93. border-right: 1px dashed #AAA;
  94. box-shadow: 0 0 3rem -1.2rem black;
  95. box-sizing: border-box;
  96. z-index: 10;
  97. display: flex;
  98. flex-direction: column;
  99. }
  100. #header h1 {
  101. margin-top: 0;
  102. }
  103. .main {
  104. padding-left: 280px;
  105. height: 100%;
  106. }
  107. #sections {
  108. min-height: 0;
  109. height: 100%;
  110. }
  111. #sections h2 {
  112. margin-top: 1rem;
  113. margin-left: 1.7rem;
  114. }
  115. .aligned {
  116. display: table-row;
  117. }
  118. .aligned > *:not(.svg-inline-wrapper) {
  119. display: table-cell;
  120. margin-top: 0.1rem;
  121. min-height: 1.4rem;
  122. }
  123. /* basic info */
  124. #basic-info {
  125. margin-bottom: 1rem;
  126. }
  127. #name {
  128. width: 100%;
  129. }
  130. #basic-info-name {
  131. display: flex;
  132. align-items: center;
  133. }
  134. #reset-name {
  135. margin: 0 .25em 0 .5em;
  136. }
  137. #url {
  138. margin-left: 0.25rem;
  139. }
  140. #url:not([href^="http"]) {
  141. display: none;
  142. }
  143. #basic-info-enabled {
  144. margin-top: 2px;
  145. display: flex;
  146. align-items: center;
  147. line-height: 16px;
  148. }
  149. #basic-info-enabled > * {
  150. margin-right: 1em;
  151. margin-left: 0;
  152. }
  153. #basic-info-enabled > :last-child {
  154. margin-right: 0;
  155. }
  156. #basic-info-enabled input,
  157. #basic-info-enabled svg {
  158. margin: auto 0;
  159. bottom: 0;
  160. }
  161. #basic-info-enabled svg {
  162. left: 2px;
  163. }
  164. #preview-errors {
  165. background-color: red;
  166. color: white;
  167. padding: 0 6px;
  168. border-radius: 9px;
  169. margin-left: -.5em;
  170. font-weight: bold;
  171. cursor: pointer;
  172. }
  173. .svg-icon {
  174. width: 16px;
  175. height: 16px;
  176. }
  177. .svg-inline-wrapper {
  178. margin-left: .2rem;
  179. display: inline-block;
  180. vertical-align: middle;
  181. }
  182. #colorpicker-settings.svg-inline-wrapper {
  183. margin: -2px 0 0 .1rem;
  184. }
  185. .svg-inline-wrapper.applies-to-help {
  186. margin: 0 0 0 .25rem;
  187. }
  188. .aligned .svg-inline-wrapper {
  189. margin: -2px 0 0 .3rem;
  190. }
  191. #sections-help {
  192. margin-left: -1px;
  193. }
  194. .svg-icon.info {
  195. width: 14px;
  196. height: 16px;
  197. }
  198. .svg-icon:hover,
  199. .svg-icon.info,
  200. .svg-icon.settings {
  201. fill: #666;
  202. }
  203. .svg-icon,
  204. .svg-icon.info:hover,
  205. .svg-icon.settings:hover {
  206. fill: #000;
  207. }
  208. #options span .svg-icon {
  209. margin-top: -3px; /* inline info and config icons */
  210. }
  211. input:invalid {
  212. background-color: rgba(255, 0, 0, 0.1);
  213. color: darkred;
  214. }
  215. #enabled {
  216. margin-left: 0;
  217. }
  218. /* collapsibles */
  219. #header summary {
  220. align-items: center;
  221. margin-left: -13px;
  222. cursor: pointer;
  223. }
  224. #header summary + * {
  225. padding: .5rem 0;
  226. }
  227. #header summary h2 {
  228. display: inline-block;
  229. border-bottom: 1px dotted transparent;
  230. margin-top: .1em;
  231. margin-bottom: .1em;
  232. margin-left: -13px;
  233. padding-left: 13px; /* clicking directly on details-marker doesn't set pref so we cover it with h2 */
  234. }
  235. #header summary:hover h2 {
  236. border-color: #bbb;
  237. }
  238. #header summary svg {
  239. margin-top: -3px;
  240. }
  241. #details-wrapper {
  242. display: flex;
  243. flex-direction: column;
  244. flex-grow: 1;
  245. }
  246. #header details[open] + details[open] {
  247. margin-top: .5rem;
  248. }
  249. #actions > * {
  250. display: inline-flex;
  251. flex-wrap: wrap;
  252. }
  253. #mozilla-format-buttons {
  254. display: flex;
  255. flex-wrap: wrap;
  256. align-items: center;
  257. }
  258. #actions > div > a {
  259. height: min-content;
  260. }
  261. #actions button,
  262. #actions > div > a {
  263. margin: 0 .2rem .5rem 0;
  264. }
  265. #actions #cancel-button {
  266. margin: 0;
  267. }
  268. #options:not([open]) + #lint h2 {
  269. margin-top: 0;
  270. }
  271. #lint:not([open]) h2 {
  272. margin-bottom: 0;
  273. }
  274. #publish > div > * {
  275. margin-top: .75em;
  276. }
  277. #publish a:visited {
  278. margin-top: .75em;
  279. }
  280. #publish[data-connected] summary::marker,
  281. #publish[data-connected] h2 {
  282. color: hsl(180, 100%, 20%);
  283. }
  284. #publish:not([data-connected]) #usw-link-info,
  285. #publish:not([data-connected]) #usw-disconnect {
  286. display: none;
  287. }
  288. #publish[data-connected] #usw-publish-style::after {
  289. content: attr(data-push);
  290. }
  291. #publish:not([data-connected]) #usw-publish-style::after {
  292. content: attr(data-publish);
  293. }
  294. #usw-link-info dl {
  295. margin: 0;
  296. display: flex;
  297. }
  298. #usw-link-info dt {
  299. flex-shrink: 0;
  300. }
  301. #usw-link-info dt::after {
  302. content: ":"
  303. }
  304. #usw-link-info dt,
  305. #usw-link-info dd {
  306. white-space: nowrap;
  307. overflow: hidden;
  308. text-overflow: ellipsis;
  309. }
  310. #usw-link-info dd {
  311. margin-left: .5em;
  312. }
  313. #usw-link-info dd[data-usw="name"] {
  314. font-weight: bold;
  315. }
  316. #usw-progress {
  317. position: relative;
  318. vertical-align: top;
  319. }
  320. #usw-progress .success,
  321. #usw-progress .unchanged {
  322. font-size: 150%;
  323. font-weight: bold;
  324. position: absolute;
  325. margin-left: .25em;
  326. }
  327. #usw-progress .success {
  328. margin-top: -.25em;
  329. }
  330. #usw-progress .success::after {
  331. content: '\2713'; /* checkmark */
  332. }
  333. #usw-progress .unchanged::after {
  334. content: '=';
  335. }
  336. #usw-progress .error {
  337. display: block;
  338. margin-top: .5em;
  339. color: red;
  340. }
  341. #usw-progress .error + div {
  342. font-size: smaller;
  343. }
  344. #usw-progress .lds-spinner {
  345. transform: scale(0.125);
  346. transform-origin: 0 10px;
  347. }
  348. /* options */
  349. #options [type="number"] {
  350. width: 3.5em;
  351. text-align: left;
  352. padding-left: .25em;
  353. }
  354. #options .option.aligned > label {
  355. padding: .1rem .25rem 0 0;
  356. vertical-align: middle;
  357. }
  358. /* footer */
  359. #footer {
  360. display: none;
  361. }
  362. .usercss #footer {
  363. display: block;
  364. margin-top: 1em;
  365. margin-bottom: .5em;
  366. }
  367. #lint:not([open]) + #footer {
  368. margin-top: 4em;
  369. }
  370. /************ section editor ***********/
  371. .CodeMirror-vscrollbar,
  372. .CodeMirror-hscrollbar {
  373. box-shadow: none !important;
  374. pointer-events: auto !important; /* FF bug */
  375. }
  376. .section-editor .section {
  377. margin: 0 0.7rem;
  378. padding: 1rem;
  379. }
  380. .section-editor .section:not(:first-child) {
  381. border-top: 2px solid hsl(0, 0%, 80%);
  382. }
  383. .add-section:after {
  384. content: attr(short-text);
  385. }
  386. #sections > div:only-of-type .add-section:after {
  387. content: attr(long-text);
  388. }
  389. #sections > div:only-of-type .remove-section {
  390. display: none;
  391. }
  392. .edit-actions {
  393. display: flex;
  394. flex-wrap: wrap;
  395. }
  396. .edit-actions button {
  397. margin-right: .2rem;
  398. }
  399. .dirty > label::before {
  400. content: "*";
  401. font-weight: bold;
  402. }
  403. #sections {
  404. counter-reset: codebox;
  405. }
  406. #sections > .section:not(.removed) > label {
  407. padding: 0 0 4px 0;
  408. display: inline-block;
  409. font-size: 13px;
  410. animation: 2s highlight;
  411. animation-play-state: paused;
  412. animation-direction: reverse;
  413. animation-fill-mode: both;
  414. }
  415. #sections > .section > label::after {
  416. counter-increment: codebox;
  417. content: counter(codebox) ": " attr(data-text);
  418. margin-left: 0.25rem;
  419. }
  420. .single-editor .applies-to {
  421. border-width: 1px 0;
  422. }
  423. .single-editor .applies-to > label::before {
  424. content: attr(data-index) ":";
  425. margin-right: 0.25rem;
  426. }
  427. .code-label[data-text] {
  428. font-weight: bold;
  429. }
  430. #toc {
  431. counter-reset: codelabel;
  432. margin: 0;
  433. padding: .5rem 0;
  434. }
  435. #toc li {
  436. white-space: nowrap;
  437. overflow: hidden;
  438. text-overflow: ellipsis;
  439. cursor: pointer;
  440. }
  441. #toc li.current:not(:only-child) {
  442. font-weight: bold;
  443. }
  444. #toc li[tabindex="-1"] {
  445. opacity: .25;
  446. pointer-events: none;
  447. }
  448. #toc li:hover {
  449. background-color: hsla(180, 50%, 36%, .2);
  450. }
  451. #toc li[tabindex="0"]::before {
  452. counter-increment: codelabel;
  453. content: counter(codelabel) ": ";
  454. }
  455. .section:only-of-type .move-section-up,
  456. .section:only-of-type .move-section-down {
  457. display: none;
  458. }
  459. .section .CodeMirror {
  460. margin-bottom: .875rem;
  461. box-sizing: border-box;
  462. }
  463. /* deleted section */
  464. .deleted-section {
  465. margin: 0;
  466. }
  467. .section .deleted-section {
  468. display: none;
  469. }
  470. .section.removed .deleted-section {
  471. display: block;
  472. }
  473. .section.removed .code-label,
  474. .section.removed .applies-to,
  475. .section.removed .edit-actions,
  476. .section.removed .CodeMirror {
  477. display: none;
  478. }
  479. .move-section-up:after {
  480. content: "";
  481. display: block;
  482. border-style: solid;
  483. border-width: 0 .3em .5em .3em;
  484. border-color: transparent transparent currentColor transparent;
  485. }
  486. .move-section-down:after {
  487. content: "";
  488. display: block;
  489. border-style: solid;
  490. border-width: .5em .3em 0 .3em;
  491. border-color: currentColor transparent transparent transparent;
  492. }
  493. /* code */
  494. .code {
  495. height: 10rem;
  496. width: 40rem;
  497. }
  498. .resize-grip-enabled .CodeMirror-scroll {
  499. height: auto !important;;
  500. position: absolute !important;
  501. top: 0;
  502. left: 0;
  503. right: 0;
  504. bottom: 6px; /* resize-grip height */
  505. }
  506. .resize-grip-enabled .CodeMirror-vscrollbar {
  507. margin-bottom: 7px; /* make space for resize-grip */
  508. }
  509. .resize-grip-enabled .CodeMirror-hscrollbar {
  510. bottom: 7px; /* make space for resize-grip */
  511. }
  512. .resize-grip-enabled .CodeMirror-scrollbar-filler {
  513. bottom: 7px; /* make space for resize-grip */
  514. }
  515. body:not(.find-open) .cm-matchhighlight,
  516. body:not(.find-open) .CodeMirror-selection-highlight-scrollbar {
  517. animation: fadein-match-highlighter 1s cubic-bezier(.97,.01,.42,.98);
  518. animation-fill-mode: both;
  519. }
  520. body:not(.find-open) [data-match-highlight-count="1"] .cm-matchhighlight,
  521. body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-highlight-scrollbar {
  522. animation: none;
  523. }
  524. @keyframes highlight {
  525. from {
  526. background-color: #ff9;
  527. }
  528. to {
  529. background-color: inherit;
  530. }
  531. }
  532. @keyframes fadein {
  533. from {
  534. opacity: 0;
  535. }
  536. to {
  537. opacity: 1;
  538. }
  539. }
  540. @keyframes fadein-match-highlighter {
  541. from { background-color: transparent; }
  542. to { background-color: rgba(1, 151, 193, 0.1); }
  543. }
  544. .resize-grip {
  545. position: absolute;
  546. display: block;
  547. height: 6px;
  548. content: "";
  549. left: 0;
  550. right: 0;
  551. bottom: 0;
  552. z-index: 9;
  553. cursor: n-resize;
  554. background-color: inherit;
  555. border-top-width: 1px;
  556. border-top-style: solid;
  557. border-top-color: inherit;
  558. }
  559. .resize-grip:after {
  560. content: "";
  561. bottom: 2px;
  562. left: 0;
  563. right: 0;
  564. margin: 0 8px;
  565. display: block;
  566. position: absolute;
  567. border-top-width: 2px;
  568. border-top-style: dotted;
  569. border-top-color: inherit;
  570. }
  571. /* applies-to */
  572. .applies-to {
  573. display: flex;
  574. align-items: flex-start;
  575. min-height: 30px;
  576. flex-wrap: wrap;
  577. }
  578. .applies-to.error {
  579. background-color: #f002;
  580. border-color: #f008;
  581. }
  582. .applies-to label {
  583. display: flex;
  584. padding: 0;
  585. height: 22px;
  586. align-items: center;
  587. margin: 0 .2em 0 0;
  588. white-space: nowrap;
  589. }
  590. .applies-to ul {
  591. flex: auto;
  592. flex-grow: 1;
  593. margin: 0;
  594. padding: 0;
  595. }
  596. .applies-to li {
  597. display: flex;
  598. flex-wrap: wrap;
  599. list-style-type: none;
  600. align-items: center;
  601. }
  602. .applies-to li.applies-to-everything {
  603. align-items: unset;
  604. line-height: 22px;
  605. }
  606. .applies-to li > input {
  607. min-height: 1.4rem;
  608. }
  609. .applies-to li:not(.applies-to-everything) > * {
  610. margin: 0 .2rem .5rem 0;
  611. }
  612. .applies-to li .add-applies-to:first-child {
  613. margin-left: 1rem;
  614. }
  615. .applies-to li .applies-value-wrapper {
  616. flex-grow: 1;
  617. display: flex;
  618. }
  619. .applies-to li .applies-value {
  620. flex-grow: 1;
  621. padding-left: 0.2rem;
  622. }
  623. .applies-to img {
  624. vertical-align: bottom;
  625. }
  626. .add-applies-to,
  627. .remove-applies-to {
  628. font-size: 0;
  629. height: 22px;
  630. width: 22px;
  631. display: inline-flex;
  632. align-items: center;
  633. justify-content: center;
  634. cursor: pointer;
  635. }
  636. .add-applies-to .svg-icon,
  637. .remove-applies-to .svg-icon {
  638. pointer-events: none;
  639. fill: hsl(0, 0%, 60%);
  640. height: 12px;
  641. width: 12px;
  642. }
  643. .add-applies-to:hover .svg-icon,
  644. .remove-applies-to:hover .svg-icon {
  645. pointer-events: none;
  646. fill: hsl(0, 0%, 0%);
  647. }
  648. .test-regexp {
  649. display: none;
  650. }
  651. .has-regexp .test-regexp {
  652. display: inline-block;
  653. }
  654. .regexp-report summary {
  655. cursor: pointer;
  656. }
  657. .regexp-report mark {
  658. background-color: rgba(255, 255, 0, .5);
  659. }
  660. .regexp-report details {
  661. margin-left: 1rem;
  662. word-break: break-all;
  663. }
  664. .regexp-report details {
  665. margin-bottom: 1rem;
  666. }
  667. .regexp-report summary {
  668. font-weight: bold;
  669. margin-left: -1rem;
  670. margin-bottom: .5rem;
  671. cursor: default;
  672. overflow-wrap: break-word;
  673. }
  674. .regexp-report details[data-type="full"] {
  675. color: darkgreen;
  676. }
  677. .regexp-report details[data-type="partial"] {
  678. color: darkgray;
  679. }
  680. .regexp-report details[data-type="invalid"] {
  681. color: maroon;
  682. }
  683. .regexp-report details details {
  684. margin-left: 2rem;
  685. margin-top: .5rem;
  686. }
  687. .regexp-report details div {
  688. max-height: calc(100vh - 15rem);
  689. overflow-y: auto;
  690. }
  691. .regexp-report .svg-icon {
  692. position: absolute;
  693. margin-top: -1px;
  694. }
  695. .regexp-report details a {
  696. color: inherit;
  697. text-decoration: none;
  698. display: block;
  699. cursor: pointer;
  700. }
  701. .regexp-report details a:hover {
  702. text-decoration: underline;
  703. }
  704. .regexp-report details a img {
  705. width: 16px;
  706. max-height: 16px;
  707. vertical-align: middle;
  708. margin-right: .5em;
  709. }
  710. .regexp-report-note {
  711. color: #999;
  712. position: absolute;
  713. bottom: 0;
  714. hyphens: auto;
  715. }
  716. /************ help popup ************/
  717. #help-popup {
  718. top: 3rem;
  719. right: 3rem;
  720. max-width: 50vw;
  721. position: fixed;
  722. display: none;
  723. background-color: white;
  724. box-shadow: 3px 3px 30px rgba(0, 0, 0, 0.5);
  725. padding: 0.5rem;
  726. z-index: 99;
  727. }
  728. #help-popup.big,
  729. #help-popup.wide {
  730. max-width: 100%;
  731. }
  732. #help-popup.big {
  733. box-shadow: rgba(0, 0, 0, 0.45) 0px 0px 0px 100000px !important;
  734. left: calc(280px - 3rem);
  735. }
  736. #help-popup.big .CodeMirror {
  737. min-height: 2rem;
  738. height: 70vh;
  739. }
  740. #help-popup .title {
  741. font-weight: bold;
  742. background-color: rgba(0,0,0,0.05);
  743. margin: -0.5rem -0.5rem 0.5rem;
  744. padding: .5rem 32px .5rem .5rem;
  745. }
  746. #help-popup .contents {
  747. max-height: calc(100vh - 8rem);
  748. overflow-y: auto;
  749. }
  750. #help-popup .settings {
  751. min-width: 500px;
  752. min-height: 200px;
  753. max-width: 48vw;
  754. }
  755. #help-popup .dismiss {
  756. position: absolute;
  757. right: 4px;
  758. top: .5em;
  759. }
  760. #help-popup input[type="search"],
  761. #help-popup .CodeMirror {
  762. margin: 3px;
  763. }
  764. #help-popup .keymap-list input[type="search"] {
  765. margin: 0 0 2px;
  766. }
  767. .keymap-list {
  768. font-size: 12px;
  769. padding: 0 3px 0 0;
  770. border-spacing: 0;
  771. word-break: break-all;
  772. }
  773. .keymap-list input {
  774. width: 100%;
  775. }
  776. .keymap-list tr:nth-child(odd) {
  777. background-color: rgba(0, 0, 0, 0.07);
  778. }
  779. .keymap-list td:first-child {
  780. white-space: nowrap;
  781. font-family: monospace;
  782. padding-right: 0.5rem;
  783. }
  784. #help-popup .buttons {
  785. text-align: center;
  786. margin-top: .75em;
  787. }
  788. .non-windows #help-popup .buttons {
  789. direction: rtl;
  790. text-align: right;
  791. }
  792. #help-popup button[name^="import"] {
  793. line-height: 1.5rem;
  794. padding: 0 0.5rem;
  795. margin: 0.5rem 0 0 0.5rem;
  796. pointer-events: none;
  797. opacity: 0.5;
  798. }
  799. #help-popup.ready button[name^="import"] {
  800. pointer-events: all;
  801. opacity: 1.0;
  802. }
  803. #help-popup .rules {
  804. padding: 0 15px;
  805. }
  806. #help-popup .rules li {
  807. padding-top: .5em;
  808. }
  809. #help-popup .rules p {
  810. margin: .25em 0;
  811. }
  812. #help-popup .buttons button:nth-child(n + 2) {
  813. margin-left: .5em;
  814. }
  815. /************ lint ************/
  816. #lint {
  817. overflow: hidden;
  818. margin-left: -1rem;
  819. margin-right: -1rem;
  820. padding: 0;
  821. box-sizing: border-box;
  822. display: flex;
  823. flex-grow: 1;
  824. position: relative;
  825. }
  826. #lint > summary {
  827. position: relative;
  828. margin-left: 0;
  829. padding-left: 4px;
  830. }
  831. #lint[open]:not(.hidden-unless-compact) {
  832. min-height: 102px;
  833. }
  834. #lint summary h2 {
  835. text-indent: -2px;
  836. }
  837. #lint > .lint-scroll-container {
  838. margin: 1rem 10px 0;
  839. position: absolute;
  840. top: 0;
  841. bottom: 0;
  842. left: 0;
  843. right: 0;
  844. overflow-y: auto;
  845. overflow-x: hidden;
  846. }
  847. #lint table {
  848. font-size: 100%;
  849. border-spacing: 0;
  850. margin-bottom: 1rem;
  851. line-height: 1.0;
  852. width: 100%;
  853. }
  854. #lint tr td:last-child {
  855. width: 100%;
  856. }
  857. #lint td[role="line"] {
  858. padding-left: 0.25rem;
  859. }
  860. #lint table:last-child {
  861. margin-bottom: 0;
  862. }
  863. #lint table.empty {
  864. display: none;
  865. }
  866. #lint caption {
  867. text-align: left;
  868. font-weight: bold;
  869. padding-bottom: 6px;
  870. }
  871. #lint tbody {
  872. font-size: 85%;
  873. cursor: pointer;
  874. }
  875. #lint tr:hover {
  876. background-color: hsla(180, 50%, 36%, .2);
  877. }
  878. #lint td {
  879. padding: 0;
  880. }
  881. #lint td[role="severity"] {
  882. font-size: 0;
  883. width: 16px;
  884. }
  885. #lint td[role="line"], #lint td[role="sep"] {
  886. text-align: right;
  887. }
  888. #lint td[role="col"] {
  889. text-align: left;
  890. padding-right: 0.25rem;
  891. }
  892. #lint td[role="message"] {
  893. text-align: left;
  894. white-space: nowrap;
  895. }
  896. #message-box.center.lint-config #message-box-contents {
  897. text-align: left;
  898. }
  899. #help-popup .active-linter-rule {
  900. font-weight: bold;
  901. text-decoration: underline;
  902. background-color: rgba(128, 128, 128, .2);
  903. }
  904. /************ CSS beautifier ************/
  905. .beautify-options {
  906. white-space: nowrap;
  907. }
  908. .beautify-options div {
  909. float: left;
  910. display: flex;
  911. align-items: center;
  912. }
  913. .beautify-options div[newline="true"] + div {
  914. clear: left;
  915. }
  916. .beautify-options div[newline="true"] + div span[indent] {
  917. padding-left: 2rem;
  918. }
  919. .beautify-options > label {
  920. top: 1em;
  921. margin: 1ex 0;
  922. }
  923. .beautify-options:after {
  924. clear: both;
  925. display: block;
  926. content: "";
  927. height: 1rem;
  928. }
  929. .beautify-options span {
  930. font-weight: bold;
  931. font-family: monospace;
  932. }
  933. .beautify-options select {
  934. border: none;
  935. background: linear-gradient(90deg, rgba(0, 0, 0, .05) 18px, rgba(0, 0, 0, .02) 24px);
  936. font-family: monospace;
  937. font-weight: bold;
  938. padding-left: 4px;
  939. margin-left: 4px;
  940. }
  941. .beautify-hint {
  942. width: 0;
  943. min-width: 100%;
  944. font-size: 90%;
  945. }
  946. /************ single editor **************/
  947. .usercss .CodeMirror-focused {
  948. box-shadow: none;
  949. }
  950. html:not(.usercss) .usercss-only,
  951. .usercss .sectioned-only {
  952. display: none !important; /* hide during page init */
  953. }
  954. body:not(.compact-layout) .hidden-unless-compact,
  955. body.linter-disabled .hidden-unless-compact {
  956. display: none !important;
  957. }
  958. #options:not([open]) + #lint {
  959. margin-top: 0;
  960. }
  961. #options-wrapper .options-column:nth-child(2) {
  962. margin-top: .75rem;
  963. }
  964. .single-editor {
  965. position: relative;
  966. height: 100%;
  967. }
  968. .single-editor .CodeMirror {
  969. /* WARNING! If you change this or .single-editor make sure editor opens huge styles like GitHub Dark instantly */
  970. position: absolute;
  971. top: 0;
  972. left: 0;
  973. right: 0;
  974. bottom: 0;
  975. height: auto;
  976. border: none;
  977. outline: none;
  978. }
  979. #footer a {
  980. color: #333;
  981. transition: color .5s;
  982. }
  983. #footer a:hover {
  984. color: #666;
  985. }
  986. /************ line widget *************/
  987. .CodeMirror-linewidget .applies-to {
  988. margin: 1em 0;
  989. padding: .75rem calc(.25rem + var(--cm-bar-width, 0)) .25rem .75rem;
  990. }
  991. .CodeMirror-linewidget .applies-to li {
  992. margin: 0;
  993. }
  994. .CodeMirror-linewidget .applies-to li[data-type="regexp"] .test-regexp {
  995. display: inline;
  996. }
  997. .CodeMirror-linewidget li.applies-to-everything {
  998. margin-left: 0.2rem;
  999. }
  1000. /************ reponsive layouts ************/
  1001. @media(max-width: 850px) {
  1002. body {
  1003. height: auto;
  1004. }
  1005. #header {
  1006. display: contents;
  1007. position: static;
  1008. }
  1009. #heading,
  1010. h2 {
  1011. display: none;
  1012. }
  1013. #basic-info {
  1014. margin: .5rem;
  1015. box-sizing: border-box;
  1016. display: flex;
  1017. flex-wrap: wrap;
  1018. }
  1019. #basic-info > :first-child {
  1020. flex-grow: 1;
  1021. }
  1022. #basic-info > :not(:last-child) {
  1023. margin-right: 0.8rem;
  1024. }
  1025. #basic-info #name {
  1026. flex-grow: 1;
  1027. }
  1028. #actions {
  1029. margin: .5rem;
  1030. display: flex;
  1031. gap: .5rem;
  1032. align-items: center;
  1033. }
  1034. #actions a,
  1035. #actions div a, /* FIXME: remove a>button */
  1036. #actions button {
  1037. margin: 0;
  1038. }
  1039. #actions > div {
  1040. display: contents;
  1041. }
  1042. #details-wrapper {
  1043. display: flex;
  1044. flex-wrap: wrap;
  1045. margin: -0.5rem 0 0;
  1046. padding: .5rem .5rem 0;
  1047. gap: .5rem;
  1048. position: sticky;
  1049. top: 0;
  1050. background: white;
  1051. z-index: 5;
  1052. border-bottom: 1px dashed rgb(170, 170, 170);
  1053. flex-direction: row;
  1054. }
  1055. #details-wrapper > details {
  1056. margin-bottom: .5rem;
  1057. }
  1058. #details-wrapper::after {
  1059. content: "";
  1060. display: block;
  1061. height: 48px;
  1062. position: absolute;
  1063. bottom: -48px;
  1064. left: 0;
  1065. width: 100%;
  1066. box-shadow: 0 3rem 3rem -4.2rem inset;
  1067. pointer-events: none;
  1068. }
  1069. #header details[open] + details[open] {
  1070. margin-top: 0;
  1071. }
  1072. #header details:not(#options) {
  1073. max-width: 50%;
  1074. }
  1075. #header summary {
  1076. margin-left: 0;
  1077. padding-left: 4px;
  1078. }
  1079. #header summary h2 {
  1080. margin: 0;
  1081. padding: 0;
  1082. }
  1083. #header summary + * {
  1084. margin-left: 1rem;
  1085. padding: .25rem 0 0;
  1086. }
  1087. #options-wrapper {
  1088. display: flex;
  1089. flex-wrap: wrap;
  1090. box-sizing: border-box;
  1091. }
  1092. #options[open] {
  1093. width: 100%;
  1094. }
  1095. .options-column {
  1096. flex-grow: 1;
  1097. padding-right: .5rem;
  1098. box-sizing: border-box;
  1099. }
  1100. .options-column > .usercss-only {
  1101. margin-bottom: 0;
  1102. }
  1103. #options-wrapper .options-column:nth-child(2) {
  1104. margin-top: 0;
  1105. }
  1106. #options:not([open]),
  1107. #lint:not([open]) {
  1108. overflow: initial;
  1109. }
  1110. #options:not([open]) + #lint:not([open]) {
  1111. margin-top: 0;
  1112. }
  1113. .option label {
  1114. margin: 0;
  1115. }
  1116. #options [type="number"] {
  1117. text-align: left; /* workaround the column flow bug in webkit */
  1118. padding-left: 0.2rem;
  1119. }
  1120. #options #tabSize-label {
  1121. position: relative;
  1122. top: 0.2rem;
  1123. }
  1124. #sections-list[open] {
  1125. max-height: 102px;
  1126. }
  1127. #sections-list[open] #toc {
  1128. max-height: 60px;
  1129. overflow-y: auto;
  1130. }
  1131. #header #lint.hidden {
  1132. display: block!important;
  1133. }
  1134. #header #lint {
  1135. margin: 0;
  1136. min-height: 0;
  1137. }
  1138. #header #lint[open] > :not(summary) {
  1139. display: none;
  1140. }
  1141. #lint > .lint-scroll-container {
  1142. padding-top: 0;
  1143. margin-right: 0;
  1144. }
  1145. #lint:not([open]) + #footer {
  1146. margin: .25em 0 -1em .25em;
  1147. }
  1148. .main {
  1149. height: auto;
  1150. padding-left: 0;
  1151. display: flex;
  1152. flex-direction: column;
  1153. flex: 1;
  1154. }
  1155. #sections > :not(.single-editor) {
  1156. margin: 0 .5rem;
  1157. padding: .5rem 0;
  1158. }
  1159. .single-editor {
  1160. overflow: hidden;
  1161. flex: 1;
  1162. }
  1163. .usercss body {
  1164. display: flex;
  1165. height: 100vh;
  1166. flex-direction: column;
  1167. }
  1168. .usercss #header {
  1169. display: block;
  1170. width: auto;
  1171. height: auto;
  1172. padding: 0;
  1173. }
  1174. .usercss #details-wrapper::after {
  1175. display: none;
  1176. }
  1177. .usercss #footer {
  1178. display: none;
  1179. }
  1180. #help-popup.big[style="display: block;"],
  1181. #help-popup[style="display: block;"] {
  1182. width: max-content;
  1183. height: min-content;
  1184. max-width: 90%;
  1185. max-height: 90vh;
  1186. top: 0;
  1187. bottom: 0;
  1188. left: 0;
  1189. right: 0;
  1190. margin: auto;
  1191. }
  1192. #help-popup[style*="left:"] {
  1193. left: 1rem !important;
  1194. margin-top: -2.35rem;
  1195. }
  1196. #help-popup:not([style*="display: block;"]),
  1197. #help-popup .CodeMirror-lint-markers,
  1198. #help-popup .CodeMirror-guttermarker-subtle {
  1199. display: none !important;
  1200. }
  1201. #help-popup .CodeMirror-linenumber {
  1202. padding: 0;
  1203. }
  1204. }