tor-browser

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

config.css (7408B)


      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 :root {
      6  --background-color: #fff;
      7  --text-color: #0c0c0d;
      8  --border-color: #e1e1e2;
      9 
     10  --toolbar-background-color: #f9f9fa;
     11  --searchbar-background-color: #ededf0;
     12  --searchbar-focused-background-color: #fff;
     13 
     14  --deemphasized-border-color: rgba(0, 0, 0, 0.05);
     15  --deemphasized-text-color: rgba(0, 0, 0, 0.5);
     16 }
     17 
     18 @media (prefers-color-scheme: dark) {
     19  :root {
     20    --background-color: #292833;
     21    --text-color: #f9f9fa;
     22    --border-color: rgba(255, 255, 255, 0.15);
     23 
     24    --toolbar-background-color: #1c1b22;
     25    --searchbar-background-color: #3f3e46;
     26    --searchbar-focused-background-color: #4c4a54;
     27 
     28    --deemphasized-border-color: rgba(249, 249, 250, 0.05);
     29    --deemphasized-text-color: rgba(249, 249, 250, 0.5);
     30  }
     31 }
     32 
     33 html,
     34 body {
     35  margin: 0;
     36  padding: 0;
     37  user-select: none;
     38  font-family: sans-serif;
     39  -moz-text-size-adjust: none;
     40  background-color: var(--background-color);
     41  color: var(--text-color);
     42 }
     43 
     44 .toolbar {
     45  width: 100%;
     46  min-height: 3em;
     47  display: flow-root;
     48  position: sticky;
     49  top: 0;
     50  left: 0;
     51  z-index: 10;
     52  background-color: var(--toolbar-background-color);
     53  font-weight: bold;
     54  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
     55 }
     56 
     57 .toolbar-container {
     58  max-width: 40em;
     59  margin-inline: auto;
     60 }
     61 
     62 #filter-container {
     63  margin: 0.375em;
     64  height: 2em;
     65  background-color: var(--searchbar-background-color);
     66  border-radius: 0.25em;
     67  border: 1px solid transparent;
     68  overflow: hidden;
     69  display: flex;
     70  float: inline-end;
     71 }
     72 
     73 #filter-container:focus-within {
     74  background-color: var(--searchbar-focused-background-color);
     75  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
     76 }
     77 
     78 #filter-input {
     79  border: none;
     80  background: none;
     81  color: inherit;
     82  flex-grow: 1;
     83  height: 100%;
     84  box-sizing: border-box;
     85  opacity: 0.75;
     86 }
     87 
     88 #new-pref-toggle-button {
     89  background-image: url("chrome://geckoview/skin/images/add.svg");
     90  background-size: 1.25em;
     91  background-position: center;
     92  background-repeat: no-repeat;
     93  height: 3em;
     94  width: 3em;
     95  outline: none;
     96  float: inline-start;
     97  -moz-context-properties: fill, fill-opacity;
     98  fill: currentColor;
     99  fill-opacity: 0.8;
    100 }
    101 
    102 #filter-search-button {
    103  background-size: 1em;
    104  background-position: center;
    105  background-repeat: no-repeat;
    106  height: 2em;
    107  width: 2em;
    108  outline: none;
    109  display: inline-block;
    110  -moz-context-properties: fill, fill-opacity;
    111  fill: currentColor;
    112  fill-opacity: 0.8;
    113 }
    114 
    115 #filter-search-button {
    116  background-image: url("chrome://geckoview/skin/images/search.svg");
    117 }
    118 
    119 #filter-search-button:dir(rtl) {
    120  scale: -1 1;
    121 }
    122 
    123 .toolbar-item {
    124  display: inline-block;
    125  height: 3em;
    126  min-width: 3em;
    127  float: right;
    128 }
    129 
    130 #content {
    131  position: relative;
    132  margin: 0 auto;
    133  padding-inline: 0;
    134  min-height: 100%;
    135  max-width: 40em;
    136 }
    137 
    138 #prefs-container {
    139  list-style: none;
    140  min-height: 100%;
    141  width: 100%;
    142  margin: 0;
    143  padding: 0;
    144  box-sizing: border-box;
    145  overflow-x: hidden;
    146 }
    147 
    148 #prefs-container li {
    149  border-bottom: 1px solid var(--border-color);
    150  cursor: pointer;
    151 }
    152 
    153 #new-pref-container {
    154  width: 100%;
    155  margin: 0;
    156  background-color: var(--background-color);
    157  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
    158  box-sizing: border-box;
    159  overflow-x: hidden;
    160  max-width: 40em;
    161  max-height: 100%;
    162  position: fixed;
    163  top: 3em;
    164  left: auto;
    165  display: none;
    166  z-index: 5;
    167 }
    168 
    169 #new-pref-container input,
    170 #new-pref-container select {
    171  border: none;
    172  background: none;
    173 }
    174 
    175 #new-pref-container.show {
    176  display: block;
    177 }
    178 
    179 #new-pref-line-boolean,
    180 #new-pref-value-string,
    181 #new-pref-value-int {
    182  display: none;
    183 }
    184 #new-pref-item[typestyle="boolean"] #new-pref-line-boolean,
    185 #new-pref-item[typestyle="string"] #new-pref-value-string,
    186 #new-pref-item[typestyle="int"] #new-pref-value-int {
    187  display: flex;
    188 }
    189 #new-pref-item[typestyle="boolean"] #new-pref-line-input {
    190  border-top: none;
    191 }
    192 
    193 .pref-name,
    194 .pref-value {
    195  padding: 15px 10px;
    196  text-align: match-parent;
    197  text-overflow: ellipsis;
    198  overflow: hidden;
    199  background: none;
    200  color: inherit;
    201  direction: ltr;
    202 }
    203 
    204 .pref-value {
    205  flex: 1 1 auto;
    206  border: none;
    207  unicode-bidi: plaintext;
    208 }
    209 
    210 .pref-name[locked] {
    211  -moz-context-properties: fill, fill-opacity;
    212  fill: currentColor;
    213  fill-opacity: 0.8;
    214  background-image: url("chrome://geckoview/skin/images/lock.svg");
    215  background-repeat: no-repeat;
    216  background-position-y: center;
    217  background-size: 1em;
    218 }
    219 
    220 :dir(ltr) > .pref-name[locked] {
    221  background-position-x: right 10px;
    222  padding-right: 30px;
    223 }
    224 
    225 :dir(rtl) > .pref-name[locked] {
    226  background-position-x: 10px;
    227  padding-left: 30px;
    228 }
    229 
    230 #new-pref-name {
    231  width: 30em;
    232 }
    233 
    234 #new-pref-type {
    235  appearance: none;
    236  color: inherit;
    237  border-inline-start: 1px solid var(--deemphasized-border-color) !important;
    238  text-align: center;
    239  width: 9em;
    240  padding-inline: 8px;
    241 }
    242 
    243 .pref-item-line {
    244  border-top: 1px solid var(--deemphasized-border-color);
    245  color: var(--deemphasized-text-color);
    246  display: flex;
    247 }
    248 
    249 #new-pref-value-boolean {
    250  flex: 1 1 auto;
    251 }
    252 
    253 #new-pref-container .pref-button.toggle {
    254  display: flex;
    255  opacity: 1;
    256  flex: 0 1 auto;
    257  float: right;
    258 }
    259 
    260 #new-pref-container .pref-button.cancel,
    261 #new-pref-container .pref-button.create {
    262  display: inline-block;
    263  opacity: 1;
    264  flex: 1 1 auto;
    265 }
    266 
    267 .pref-item-line {
    268  pointer-events: none;
    269 }
    270 
    271 #new-pref-container .pref-item-line,
    272 .pref-item.selected .pref-item-line,
    273 .pref-item:not(.selected) .pref-button.reset {
    274  pointer-events: auto;
    275 }
    276 
    277 #new-pref-container .pref-button.create[disabled] {
    278  opacity: 0.5;
    279 }
    280 
    281 .pref-item.selected {
    282  background-color: hsla(0, 0%, 60%, 0.2);
    283 }
    284 
    285 .pref-button {
    286  display: inline-flex;
    287  box-sizing: border-box;
    288  align-items: center;
    289  text-align: center;
    290  padding: 10px 1em;
    291  border-inline-start: 1px solid var(--deemphasized-border-color);
    292  opacity: 0;
    293  transition-property: opacity;
    294  transition-duration: 500ms;
    295 }
    296 
    297 .pref-item.selected .pref-item-line .pref-button {
    298  opacity: 1;
    299 }
    300 
    301 .pref-item:not(.selected) .pref-item-line .pref-button:not(.reset) {
    302  display: none;
    303 }
    304 
    305 .pref-item:not(.selected) .pref-button.reset {
    306  opacity: 1;
    307 }
    308 
    309 .pref-button:active,
    310 #new-pref-type:active {
    311  background-color: hsla(0, 0%, 60%, 0.4);
    312 }
    313 
    314 .pref-button[disabled] {
    315  display: none;
    316 }
    317 
    318 .pref-button.up,
    319 .pref-button.down {
    320  -moz-context-properties: fill, fill-opacity;
    321  fill: var(--text-color);
    322  fill-opacity: 0.8;
    323  background-size: 1em;
    324  background-position: center;
    325  background-repeat: no-repeat;
    326 }
    327 
    328 .pref-button.up {
    329  background-image: url("chrome://geckoview/skin/images/arrow-up.svg");
    330 }
    331 
    332 .pref-button.down {
    333  background-image: url("chrome://geckoview/skin/images/arrow-down.svg");
    334 }
    335 
    336 #prefs-shield {
    337  width: 100%;
    338  height: 100%;
    339  background-color: rgba(0, 0, 0, 0.45);
    340  position: fixed;
    341  top: 0;
    342  left: 0;
    343  opacity: 0;
    344  transition-property: opacity;
    345  transition-duration: 500ms;
    346  display: none;
    347 }
    348 
    349 #prefs-shield[shown] {
    350  display: block;
    351  opacity: 1;
    352 }
    353 
    354 #loading-container::before {
    355  content: "";
    356  display: block;
    357  width: 1.25em;
    358  height: 1.25em;
    359  border: 0.15em solid currentColor;
    360  margin: 1em auto;
    361  border-right-color: transparent;
    362  border-radius: 100%;
    363  opacity: 0.8;
    364  animation: 1.1s linear infinite spin;
    365 }
    366 
    367 @keyframes spin {
    368  from {
    369    transform: none;
    370  }
    371  to {
    372    transform: rotate(360deg);
    373  }
    374 }