tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

styleeditor.css (6656B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #style-editor-chrome {
      6  flex: 1;
      7 }
      8 
      9 .splitview-nav > li,
     10 .stylesheet-info,
     11 .stylesheet-more,
     12 .stylesheet-rule-count,
     13 li.splitview-active > hgroup > .stylesheet-more > h3 > .stylesheet-saveButton,
     14 li:hover > hgroup > .stylesheet-more > h3 > .stylesheet-saveButton {
     15  display: flex;
     16 }
     17 
     18 .devtools-toolbar > spacer {
     19  flex: 1;
     20 }
     21 
     22 .style-editor-newButton {
     23  list-style-image: url(images/add.svg);
     24 }
     25 
     26 .style-editor-importButton {
     27  list-style-image: url(images/import.svg);
     28 }
     29 
     30 /* Filter input */
     31 #style-editor-chrome toolbar .devtools-searchbox {
     32  /* Adjust default focused styling as it looks a bit off */
     33  outline-offset: -2px;
     34 
     35  & > .devtools-filterinput {
     36    box-shadow: none;
     37  }
     38 }
     39 
     40 .stylesheet-details-container {
     41  flex: 1;
     42  min-width: 0;
     43  min-height: 0;
     44 }
     45 
     46 .stylesheet-editor-status {
     47  display: flex;
     48  align-items: center;
     49  border-block-start: 1px solid var(--theme-splitter-color) !important;
     50  border-block-end: none !important;
     51 
     52  /* Hide the editor toolbar if there's no active stylesheet editor */
     53  .devtools-main-content:not(:has(.splitview-active)) + & {
     54    display: none;
     55  }
     56 
     57  .style-editor-prettyPrintButton.devtools-button {
     58    margin: 0;
     59    /*
     60     * common.css sets a pointer-events:none on disabled button,
     61     * but here we want the title to be displayed since it gives extra information.
     62     */
     63    pointer-events: all;
     64 
     65    &::before {
     66      background-image: url(chrome://devtools/content/debugger/images/prettyPrint.svg);
     67    }
     68    &.pretty::before {
     69      -moz-context-properties: stroke;
     70      stroke: var(--theme-icon-checked-color);
     71    }
     72  }
     73 }
     74 
     75 .stylesheet-at-rules-container {
     76  overflow-y: auto;
     77  min-width: 0;
     78  min-height: 0;
     79 }
     80 
     81 .stylesheet-error-message {
     82  display: none;
     83 }
     84 
     85 li.error > .stylesheet-info > .stylesheet-more > .stylesheet-error-message {
     86  display: block;
     87 }
     88 
     89 .stylesheet-title,
     90 .stylesheet-name {
     91  text-decoration: none;
     92 }
     93 
     94 .stylesheet-name {
     95  font-size: 13px;
     96  white-space: nowrap;
     97 }
     98 
     99 .stylesheet-name > label {
    100  display: inline;
    101  cursor: pointer;
    102 }
    103 
    104 .stylesheet-info > h1 {
    105  flex: 1;
    106 }
    107 
    108 .stylesheet-info a.stylesheet-name:focus-visible {
    109  outline-offset: -2px;
    110 }
    111 
    112 .splitview-nav > li > hgroup.stylesheet-info {
    113  justify-content: center;
    114  /* This prevents stylesheets with long names from breaking the layout of
    115  the StyleEditor sources sidebar. */
    116  overflow: hidden;
    117 }
    118 
    119 .stylesheet-more > spacer {
    120  flex: 1;
    121 }
    122 
    123 .stylesheet-title,
    124 .stylesheet-name,
    125 .stylesheet-rule-count,
    126 .stylesheet-linked-file,
    127 .stylesheet-saveButton {
    128  color: var(--theme-body-color);
    129 }
    130 
    131 .stylesheet-saveButton {
    132  display: none;
    133  margin-top: 0;
    134  margin-bottom: 0;
    135  text-decoration: underline;
    136  cursor: pointer;
    137 }
    138 
    139 .splitview-active .stylesheet-title,
    140 .splitview-active .stylesheet-name,
    141 .theme-light .splitview-active .stylesheet-rule-count,
    142 .theme-light .splitview-active .stylesheet-linked-file,
    143 .theme-light .splitview-active .stylesheet-saveButton {
    144  color: var(--theme-selection-color);
    145 }
    146 
    147 .splitview-nav:focus {
    148  outline: 0; /* focus ring is on the stylesheet name */
    149 }
    150 
    151 .splitview-nav > li {
    152  flex-direction: row;
    153 }
    154 
    155 .splitview-nav > li > hgroup {
    156  display: flex;
    157  flex-direction: column;
    158  flex: 1;
    159 }
    160 
    161 .splitview-nav > li.unsaved > hgroup .stylesheet-name {
    162  font-style: italic;
    163 }
    164 
    165 .splitview-nav:-moz-locale-dir(ltr) > li.unsaved > hgroup .stylesheet-name:before,
    166 .splitview-nav:-moz-locale-dir(rtl) > li.unsaved > hgroup .stylesheet-name:after {
    167  font-style: italic;
    168 }
    169 
    170 .splitview-nav.empty > p {
    171  padding: 0 10px;
    172 }
    173 
    174 .stylesheet-sidebar {
    175  max-width: 400px;
    176  min-width: 100px;
    177  border-color: var(--theme-splitter-color);
    178 }
    179 
    180 .at-rule-label {
    181  display: grid;
    182  /*
    183   * +----------------------------------------------+
    184   * |        Rule information        | line number |
    185   * +----------------------------------------------+
    186   */
    187  grid-template-columns: 1fr max-content;
    188  padding: 4px;
    189  border-bottom: 1px solid var(--theme-splitter-color);
    190  cursor: pointer;
    191  word-break: break-word;
    192 }
    193 
    194 .media-responsive-mode-toggle {
    195  color: var(--theme-highlight-blue);
    196  text-decoration: underline;
    197 }
    198 
    199 .at-rule-line {
    200  padding-inline-start: 4px;
    201 }
    202 
    203 .media-condition-unmatched {
    204  color: var(--theme-text-color-inactive);
    205 }
    206 
    207 .stylesheet-toggle {
    208  display: flex;
    209  cursor: pointer;
    210  padding: 8px 0;
    211  margin: 0 8px;
    212  background-image: url(images/eye-opened.svg);
    213  background-repeat: no-repeat;
    214  background-clip: content-box;
    215  background-position: center;
    216  background-size: 16px;
    217  width: 24px;
    218  height: 40px;
    219  flex-shrink: 0;
    220 
    221  /* The icon color should always match the text color. */
    222  -moz-context-properties: fill, stroke;
    223  fill: currentColor;
    224  stroke: currentColor;
    225 
    226  .disabled > & {
    227    background-image: url(images/eye-closed.svg);
    228  }
    229 
    230  .stylesheet-readonly & {
    231    background-image: url(images/lock.svg);
    232    cursor: auto;
    233    /* Override the default "color: grayText" from [disabled] browser style */
    234    color: currentColor;
    235  }
    236 }
    237 
    238 .stylesheet-linked-file:not(:empty) {
    239  margin-inline-end: 0.4em;
    240 }
    241 
    242 .stylesheet-linked-file:not(:empty):before {
    243  margin-inline-start: 0.4em;
    244  content: " ↳ ";
    245 }
    246 
    247 li.unsaved > hgroup > h1 > .stylesheet-name:before {
    248  content: "*";
    249 }
    250 
    251 li.linked-file-error .stylesheet-linked-file {
    252  text-decoration: line-through;
    253 }
    254 
    255 li.linked-file-error .stylesheet-linked-file:after {
    256  font-size: 110%;
    257  content: " ✘";
    258 }
    259 
    260 li.linked-file-error .stylesheet-rule-count {
    261  visibility: hidden;
    262 }
    263 
    264 .stylesheet-more > h3 {
    265  font-size: 11px;
    266  margin-inline-end: 2px;
    267 }
    268 
    269 .placeholder a {
    270  text-decoration: underline;
    271 }
    272 
    273 h1,
    274 h2,
    275 h3 {
    276  font-size: inherit;
    277  font-weight: normal;
    278  margin: 0;
    279  padding: 0;
    280 }
    281 
    282 @media (max-width: 700px) {
    283  .stylesheet-sidebar {
    284    width: 150px;
    285  }
    286 }
    287 
    288 /* portrait mode */
    289 @media (max-width: 550px) {
    290  li.splitview-active > hgroup > .stylesheet-more > .stylesheet-rule-count,
    291  li:hover > hgroup > .stylesheet-more > .stylesheet-rule-count {
    292    display: none;
    293  }
    294 
    295  .splitview-nav {
    296    box-shadow: none;
    297  }
    298 
    299  .splitview-nav > li.splitview-active {
    300    background-size:
    301      0 0,
    302      0 0,
    303      auto;
    304  }
    305 
    306  .stylesheet-toggle {
    307    padding: 0;
    308    height: 24px;
    309  }
    310 
    311  .splitview-nav > li > hgroup.stylesheet-info {
    312    align-items: baseline;
    313    flex-direction: row;
    314    flex: 1;
    315  }
    316 
    317  .stylesheet-sidebar {
    318    width: 180px;
    319  }
    320 
    321  .stylesheet-more {
    322    flex: 1;
    323    justify-content: flex-end;
    324  }
    325 
    326  .stylesheet-more > spacer {
    327    flex: none;
    328  }
    329 }
    330 
    331 .source-editor-frame {
    332  flex: 1;
    333 }