| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716 |
- :root {
- --header-narrow-min-height: 12em;
- }
- body {
- margin: 0;
- font: 12px arial,sans-serif;
- }
- #global-progress {
- position: fixed;
- height: 4px;
- top: 0;
- left: 0;
- right: 0;
- background-color: hsla(180, 66%, 36%, .25);
- border-left: 0 solid darkcyan;
- z-index: 2147483647;
- opacity: 0;
- transition: opacity 2s;
- }
- #global-progress[title] {
- opacity: 1;
- }
- .hidden {
- display: none !important;
- }
- /************ header ************/
- #header {
- width: 280px;
- height: 100vh;
- overflow: auto;
- position: fixed;
- top: 0;
- padding: 15px;
- border-right: 1px dashed #AAA;
- -webkit-box-shadow: 0 0 3rem -1.2rem black;
- box-shadow: 0 0 3rem -1.2rem black;
- box-sizing: border-box;
- z-index: 10;
- }
- #header h1 {
- margin-top: 0;
- }
- #sections {
- padding-left: 280px;
- }
- #sections h2 {
- margin-top: 1rem;
- margin-left: 1.7rem;
- }
- .aligned {
- display: table-row;
- }
- .aligned > *:not(.svg-inline-wrapper) {
- display: table-cell;
- margin-top: 0.1rem;
- min-height: 1.4rem;
- }
- input[type="checkbox"] {
- margin-left: 0.1rem;
- }
- /* basic info */
- #basic-info {
- margin-bottom: 1rem;
- }
- #name {
- width: 100%;
- }
- #basic-info-name {
- display: flex;
- align-items: center;
- }
- #url {
- margin-left: 0.25rem;
- }
- #url:not([href^="http"]) {
- display: none;
- }
- #save-button {
- opacity: .5;
- pointer-events: none;
- }
- .dirty #save-button {
- opacity: 1;
- pointer-events: all;
- }
- .svg-icon {
- cursor: pointer;
- vertical-align: middle;
- transition: fill .5s;
- width: 16px;
- height: 16px;
- margin-left: 0.2rem;
- }
- h2 .svg-icon, label .svg-icon {
- margin-top: -1px;
- }
- .svg-icon.info,
- .svg-icon.settings {
- width: 14px;
- height: 16px;
- }
- .svg-icon:hover,
- .svg-icon.info,
- .svg-icon.settings {
- fill: #666;
- }
- .svg-icon,
- .svg-icon.info:hover,
- .svg-icon.settings:hover {
- fill: #000;
- }
- input:invalid {
- background-color: rgba(255, 0, 0, 0.1);
- color: darkred;
- }
- #enabled {
- margin-left: 0;
- vertical-align: middle;
- }
- #enabled-label {
- vertical-align: middle;
- }
- /* actions */
- #actions > * {
- margin-right: 0.5rem;
- margin-bottom: 0.5rem;
- }
- /* collapsibles */
- #header summary {
- align-items: center;
- margin-left: -13px;
- cursor: pointer;
- outline: none;
- }
- #header summary h2 {
- display: inline-block;
- border-bottom: 2px dotted transparent;
- }
- #header summary h2:hover {
- border-color: #bbb;
- }
- #header summary svg {
- margin-top: -3px;
- }
- #options:not([open]) + #lint h2 {
- margin-top: 0;
- }
- #lint:not([open]) h2 {
- margin-bottom: 0;
- }
- /* options */
- #options [type="number"] {
- width: 3.5em;
- text-align: left;
- padding-left: .25em;
- }
- #options .option.aligned > * {
- padding-right: 0.25rem;
- }
- .set-option-progress {
- position: absolute;
- background-color: currentColor;
- content: "";
- opacity: .15;
- }
- /* footer */
- #footer {
- margin-top: 1em;
- margin-bottom: .5em;
- }
- /************ content ***********/
- #sections > div {
- margin: 0.7rem;
- padding: 1rem;
- }
- #sections > div:not(:first-of-type) {
- border-top: 2px solid black;
- }
- #sections > div:only-of-type .remove-section {
- display: none;
- }
- #sections > div > button:not(:first-of-type) {
- margin-left: 0.2rem;
- }
- .dirty > label::before {
- content: "*";
- font-weight: bold;
- }
- #sections {
- counter-reset: codebox;
- }
- #sections > div > label {
- animation: 2s highlight;
- animation-play-state: paused;
- animation-direction: reverse;
- animation-fill-mode: both;
- }
- #sections > div > label::after {
- counter-increment: codebox;
- content: counter(codebox);
- margin-left: 0.25rem;
- }
- /* code */
- .code {
- height: 10rem;
- width: 40rem;
- }
- .resize-grip-enabled .CodeMirror-scroll {
- height: auto !important;;
- position: absolute !important;
- top: 0;
- left: 0;
- right: 0;
- bottom: 6px; /* resize-grip height */
- }
- .resize-grip-enabled .CodeMirror-vscrollbar {
- margin-bottom: 7px; /* make space for resize-grip */
- }
- .resize-grip-enabled .CodeMirror-hscrollbar {
- bottom: 7px; /* make space for resize-grip */
- }
- .resize-grip-enabled .CodeMirror-scrollbar-filler {
- bottom: 7px; /* make space for resize-grip */
- }
- body[data-match-highlight="token"] .cm-matchhighlight-approved .cm-matchhighlight,
- body[data-match-highlight="token"] .CodeMirror-selection-highlight-scrollbar {
- animation: fadein-match-highlighter 1s cubic-bezier(.97,.01,.42,.98);
- animation-fill-mode: both;
- }
- body[data-match-highlight="selection"] .cm-matchhighlight-approved .cm-matchhighlight,
- body[data-match-highlight="selection"] .CodeMirror-selection-highlight-scrollbar {
- background-color: rgba(1, 151, 193, 0.1);
- }
- @-webkit-keyframes highlight {
- from {
- background-color: #ff9;
- }
- to {
- background-color: none;
- }
- }
- @keyframes fadein {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes fadein-match-highlighter {
- from { background-color: transparent; }
- to { background-color: rgba(1, 151, 193, 0.1); }
- }
- .resize-grip {
- position: absolute;
- display: block;
- height: 6px;
- content: "";
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 9;
- cursor: n-resize;
- background-color: inherit;
- border-top-width: 1px;
- border-top-style: solid;
- border-top-color: inherit;
- }
- .resize-grip:after {
- content: "";
- bottom: 2px;
- left: 0;
- right: 0;
- margin: 0 8px;
- display: block;
- position: absolute;
- border-top-width: 2px;
- border-top-style: dotted;
- border-top-color: inherit;
- }
- /* applies-to */
- .applies-to {
- display: flex;
- }
- .applies-to label {
- flex: auto;
- margin-top: 0.2rem;
- }
- .applies-to ul {
- flex: auto;
- flex-grow: 99;
- margin: 0;
- padding: 0;
- }
- .applies-to li {
- display: flex;
- list-style-type: none;
- align-items: center;
- margin-bottom: 0.35rem;
- }
- .applies-to li > *:not(button) {
- flex: auto;
- min-height: 1.4rem;
- margin-left: 0.35rem;
- }
- .applies-to li .add-applies-to {
- visibility: hidden;
- text-align: left;
- }
- .applies-to li:last-child .add-applies-to {
- visibility: visible
- }
- .applies-to li .add-applies-to:first-child {
- margin-left: 1rem;
- }
- .applies-to li .applies-value {
- flex-grow: 99;
- padding-left: 0.2rem;
- }
- .applies-to img {
- vertical-align: bottom;
- }
- .test-regexp {
- display: none;
- }
- .has-regexp .test-regexp {
- display: inline-block;
- }
- .regexp-report summary, .regexp-report div {
- cursor: pointer;
- outline: none;
- }
- .regexp-report mark {
- background-color: rgba(255, 255, 0, .5);
- }
- .regexp-report details {
- margin-left: 1rem;
- word-break: break-all;
- }
- .regexp-report details:not(:last-child) {
- margin-bottom: 1rem;
- }
- .regexp-report summary {
- font-weight: bold;
- margin-left: -1rem;
- margin-bottom: .5rem;
- outline: none;
- cursor: default;
- overflow-wrap: break-word;
- }
- .regexp-report details[data-type="full"] {
- color: darkgreen;
- }
- .regexp-report details[data-type="partial"] {
- color: darkgray;
- }
- .regexp-report details[data-type="invalid"] {
- color: maroon;
- }
- .regexp-report details details {
- margin-left: 2rem;
- margin-top: .5rem;
- }
- .regexp-report .svg-icon {
- position: absolute;
- margin-top: -1px;
- }
- .regexp-report details div:hover {
- text-decoration: underline;
- text-decoration-skip: ink;
- }
- .regexp-report details div img {
- width: 16px;
- max-height: 16px;
- position: absolute;
- margin-left: -20px;
- margin-top: -1px;
- }
- /************ help popup ************/
- #help-popup {
- top: 3rem;
- right: 3rem;
- max-width: 50vw;
- position: fixed;
- display: none;
- background-color: white;
- box-shadow: 3px 3px 30px rgba(0, 0, 0, 0.5);
- padding: 0.5rem;
- z-index: 99;
- }
- #help-popup.big {
- box-shadow: rgba(0, 0, 0, 0.45) 0px 0px 0px 100000px !important;
- max-width: 100%;
- left: 3rem;
- }
- #help-popup.big .CodeMirror {
- min-height: 2rem;
- height: 70vh;
- }
- #help-popup .title {
- font-weight: bold;
- background-color: rgba(0,0,0,0.05);
- margin: -0.5rem -0.5rem 0.5rem;
- padding: .5rem 32px .5rem .5rem;
- }
- #help-popup .contents {
- max-height: calc(100vh - 8rem);
- overflow-y: auto;
- }
- #help-popup .settings {
- min-width: 500px;
- min-height: 200px;
- max-width: 48vw;
- }
- #help-popup .dismiss {
- position: absolute;
- right: 4px;
- top: .5em;
- }
- #help-popup .saved-message {
- display: none;
- color: #090;
- margin-left: 10px;
- font-weight: bold;
- }
- #help-popup .saved-message.show {
- display: inline-block;
- }
- .keymap-list {
- font-size: 85%;
- line-height: 1.0;
- border-spacing: 0;
- word-break: break-all;
- }
- .keymap-list input {
- width: 100%;
- }
- .keymap-list tr:nth-child(odd) {
- background-color: rgba(0, 0, 0, 0.07);
- }
- .keymap-list td:first-child {
- white-space: nowrap;
- font-family: monospace;
- padding-right: 0.5rem;
- }
- #help-popup button[name^="import"] {
- line-height: 1.5rem;
- padding: 0 0.5rem;
- margin: 0.5rem 0 0 0.5rem;
- pointer-events: none;
- opacity: 0.5;
- float: right;
- }
- #help-popup.ready button[name^="import"] {
- pointer-events: all;
- opacity: 1.0;
- }
- #help-popup .rules {
- padding: 0 15px;
- }
- #help-popup button {
- margin-right: 3px;
- }
- /************ lint ************/
- #lint > div {
- overflow-y: auto;
- }
- #lint table {
- font-size: 100%;
- border-spacing: 0;
- margin-bottom: 1rem;
- line-height: 1.0;
- }
- #lint table:last-child {
- margin-bottom: 0;
- }
- #lint caption {
- text-align: left;
- font-weight: bold;
- }
- #lint tbody {
- font-size: 85%;
- cursor: pointer;
- }
- #lint tr:hover {
- background-color: rgba(0, 0, 0, 0.1);
- }
- #lint td[role="severity"] {
- font-size: 0;
- width: 16px;
- }
- #lint td[role="line"], #lint td[role="sep"] {
- text-align: right;
- padding-right: 0;
- }
- #lint td[role="col"] {
- text-align: left;
- padding-right: 0.25rem;
- }
- #lint td[role="message"] {
- text-align: left;
- }
- #message-box.center.lint-config #message-box-contents {
- text-align: left;
- }
- /************ CSS beautifier ************/
- .beautify-options {
- white-space: nowrap;
- font-family: monospace;
- }
- .beautify-options div {
- float: left;
- }
- .beautify-options div[newline="true"] + div {
- clear: left;
- }
- .beautify-options div[newline="true"] + div span[indent] {
- padding-left: 2rem;
- }
- .beautify-options:after {
- clear: both;
- display: block;
- content: " ";
- height: 1rem;
- }
- .beautify-options span {
- font-weight: bold;
- }
- .beautify-options select {
- border: none;
- background-color: rgba(0, 0, 0, 0.05);
- }
- /************ single editor **************/
- .usercss body {
- display: flex;
- height: 100vh;
- flex-direction: column;
- justify-items: normal;
- }
- #sections .single-editor {
- margin: 0;
- padding: 0;
- display: flex;
- box-sizing: border-box;
- }
- .single-editor .CodeMirror {
- width: 100%;
- height: auto;
- border: none;
- outline: none;
- }
- #footer a {
- color: #333;
- transition: color .5s;
- text-decoration-skip: ink;
- animation: fadein 10s;
- }
- #footer a:hover {
- color: #666;
- }
- .usercss.firefox #sections,
- .usercss.firefox .single-editor,
- .usercss.firefox .CodeMirror {
- height: 100%;
- }
- /************ line widget *************/
- .CodeMirror-linewidget .applies-to {
- margin: 1em 0;
- padding: 1em;
- padding-right: calc(1em + 20px);
- }
- .CodeMirror-linewidget .applies-to li {
- margin: 0;
- }
- .CodeMirror-linewidget .applies-to li + li {
- margin-top: 0.35rem;
- }
- .CodeMirror-linewidget .applies-to li:not([data-type="regexp"]) .applies-to-regexp-test {
- display: none;
- }
- .CodeMirror-linewidget li.applies-to-everything {
- margin-top: 0.2rem;
- }
- /************ reponsive layouts ************/
- @media(max-width:737px) {
- #header {
- width: auto;
- height: auto;
- position: inherit;
- border-right: none;
- border-bottom: 1px dashed #AAA;
- min-height: var(--header-narrow-min-height);
- max-height: 50vh;
- }
- #header section:not(:last-child) {
- margin-bottom: 0.4rem;
- }
- #header input[type="checkbox"] {
- vertical-align: middle;
- }
- #heading,
- h2 {
- display: none;
- }
- #basic-info {
- display: flex;
- align-items: baseline;
- }
- #basic-info > * {
- flex: auto;
- }
- #basic-info > *:first-child {
- flex-grow: 99;
- display: flex;
- }
- #basic-info > *:not(:last-child) {
- margin-right: 0.8rem;
- }
- #basic-info #name {
- width: auto;
- flex-grow: 99;
- }
- #actions {
- margin-top: 1rem;
- }
- #actions > * {
- display: inline-block;
- }
- #options {
- -webkit-column-count: 2;
- -moz-column-count: 2;
- column-count: 2;
- }
- #options h2 {
- margin: 0 0 .5em;
- }
- #options .aligned > *:not(.svg-inline-wrapper) {
- margin: 1px 0 0 0; /* workaround the flowing-padding column bug in webkit */
- padding-right: 0.4rem;
- vertical-align: baseline;
- min-height: 1.4rem;
- }
- .option label {
- line-height: 1.25rem;
- margin: 0;
- }
- #options [type="number"] {
- text-align: left; /* workaround the column flow bug in webkit */
- padding-left: 0.2rem;
- }
- #options #tabSize-label {
- position: relative;
- top: 0.2rem;
- }
- #options:not([open]) ~ #lint {
- margin-top: -1ex;
- }
- #lint > div {
- max-height: 20vh;
- }
- #lint table {
- width: 100%;
- }
- #lint td[role="message"] {
- max-width: none;
- }
- #sections {
- padding-left: 0;
- }
- #sections > div {
- padding: 0;
- }
- #sections > *:not(h2) {
- padding-left: 0.4rem;
- }
- .applies-type {
- width: 30%;
- }
- .usercss .CodeMirror-scroll {
- max-height: calc(100vh - var(--header-narrow-min-height));
- }
- .usercss #options:not([open]) ~ #lint.hidden ~ #footer,
- .usercss #lint:not([open]) + #footer {
- margin-top: -.25em;
- }
- }
- @media(max-width:500px) {
- #options {
- -webkit-column-count: 1;
- -moz-column-count: 1;
- column-count: 1;
- }
- #options #tabSize-label {
- position: static;
- }
- }
|