tor-browser

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

UITour.css (4649B)


      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 @namespace html url("http://www.w3.org/1999/xhtml");
      6 
      7 /* UI Tour */
      8 
      9 @keyframes uitour-wobble {
     10  from {
     11    transform: rotate(0deg) translateX(3px) rotate(0deg);
     12  }
     13  50% {
     14    transform: rotate(360deg) translateX(3px) rotate(-360deg);
     15  }
     16  to {
     17    transform: rotate(720deg) translateX(0) rotate(-720deg);
     18  }
     19 }
     20 
     21 @keyframes uitour-zoom {
     22  from {
     23    transform: scale(0.8);
     24  }
     25  50% {
     26    transform: scale(1);
     27  }
     28  to {
     29    transform: scale(0.8);
     30  }
     31 }
     32 
     33 @keyframes uitour-color {
     34  from {
     35    border-color: #5b9cd9;
     36  }
     37  50% {
     38    border-color: #ff0000;
     39  }
     40  to {
     41    border-color: #5b9cd9;
     42  }
     43 }
     44 
     45 #UITourHighlightContainer {
     46  appearance: none;
     47  pointer-events: none;
     48 
     49  /* Resets the native styles in windows and macOS */
     50  border: none;
     51  background-color: transparent;
     52  -moz-window-shadow: none;
     53 
     54  --panel-border-color: transparent;
     55  --panel-background: transparent;
     56  /* This is a buffer to compensate for the movement in the "wobble" effect,
     57     and for the box-shadow of #UITourHighlight. */
     58  --panel-padding: 4px;
     59  /* Compensate the displacement caused by padding. */
     60  margin: -4px;
     61 }
     62 
     63 #UITourHighlight {
     64  background-color: rgba(0, 200, 215, 0.3);
     65  min-height: 24px;
     66  min-width: 24px;
     67 
     68  &.rounded-highlight {
     69    border-radius: var(--border-radius-small);
     70  }
     71 
     72  &[active] {
     73    animation-delay: 2s;
     74    animation-fill-mode: forwards;
     75    animation-iteration-count: infinite;
     76    animation-timing-function: linear;
     77  }
     78 
     79  &[active="wobble"] {
     80    animation-name: uitour-wobble;
     81    animation-delay: 0s;
     82    animation-duration: 1.5s;
     83    animation-iteration-count: 1;
     84  }
     85 
     86  &[active="zoom"] {
     87    animation-name: uitour-zoom;
     88    animation-duration: 1s;
     89  }
     90 
     91  &[active="color"] {
     92    animation-name: uitour-color;
     93    animation-duration: 2s;
     94  }
     95 }
     96 
     97 #UITourTooltipBody {
     98  align-items: flex-start;
     99 }
    100 
    101 #UITourTooltipTitleContainer {
    102  align-items: flex-start;
    103  margin-bottom: 10px;
    104 }
    105 
    106 #UITourTooltipIcon {
    107  width: var(--size-item-xlarge);
    108  height: var(--size-item-xlarge);
    109  margin-inline-end: 10px;
    110 }
    111 
    112 #UITourTooltipTitle,
    113 #UITourTooltipDescription {
    114  max-width: 20rem;
    115 }
    116 
    117 #UITourTooltipTitle {
    118  font-size: 1.45rem;
    119  font-weight: var(--font-weight-bold);
    120  margin: 0;
    121 }
    122 
    123 #UITourTooltipDescription {
    124  margin-inline: 0;
    125  font-size: 1.15rem;
    126  line-height: 1.8rem;
    127  margin-bottom: 0; /* Override global.css */
    128 }
    129 
    130 #UITourTooltipClose {
    131  position: relative;
    132  appearance: none;
    133  border: none;
    134  background-color: transparent;
    135  min-width: 0;
    136  margin-inline-start: 4px;
    137  margin-top: -2px;
    138 }
    139 
    140 #UITourTooltipClose > .toolbarbutton-text {
    141  display: none;
    142 }
    143 
    144 #UITourTooltipButtons {
    145  justify-content: flex-end;
    146  background-color: var(--arrowpanel-dimmed);
    147  border-top: 1px solid var(--panel-separator-color);
    148  margin: 10px -16px -16px;
    149  padding: 16px;
    150 }
    151 
    152 #UITourTooltipButtons > label,
    153 #UITourTooltipButtons > button {
    154  margin: 0 15px;
    155 }
    156 
    157 #UITourTooltipButtons > label:first-child,
    158 #UITourTooltipButtons > button:first-child {
    159  margin-inline-start: 0;
    160 }
    161 
    162 #UITourTooltipButtons > label:last-child,
    163 #UITourTooltipButtons > button:last-child {
    164  margin-inline-end: 0;
    165 }
    166 
    167 #UITourTooltipButtons > button[image] > .button-box > .button-icon {
    168  width: 16px;
    169  height: 16px;
    170  margin-inline-end: 5px;
    171 }
    172 
    173 #UITourTooltipButtons > label,
    174 #UITourTooltipButtons > button .button-text {
    175  font-size: 1.15rem;
    176 }
    177 
    178 #UITourTooltipButtons > button:not(.button-link) {
    179  appearance: none;
    180  background-color: rgb(251, 251, 251);
    181  border-radius: var(--border-radius-xsmall);
    182  border: 1px solid;
    183  border-color: rgb(192, 192, 192);
    184  color: rgb(71, 71, 71);
    185  padding: 4px 30px;
    186  transition-property: background-color, border-color;
    187  transition-duration: 150ms;
    188 }
    189 
    190 #UITourTooltipButtons > button:not(.button-link, :active):hover {
    191  background-color: hsla(210, 4%, 10%, 0.15);
    192  border-color: hsla(210, 4%, 10%, 0.15);
    193  box-shadow: 0 1px 0 0 hsla(210, 4%, 10%, 0.05) inset;
    194 }
    195 
    196 #UITourTooltipButtons > label,
    197 #UITourTooltipButtons > button.button-link:not(:hover) {
    198  appearance: none;
    199  background: transparent;
    200  border: none;
    201  box-shadow: none;
    202  color: var(--text-color-disabled);
    203  padding-inline: 10px;
    204 }
    205 
    206 /* The primary button gets the same color as the customize button. */
    207 #UITourTooltipButtons > button.button-primary {
    208  background-color: rgb(116, 191, 67);
    209  color: white;
    210  padding-inline: 30px;
    211 }
    212 
    213 #UITourTooltipButtons > button.button-primary:not(:active):hover {
    214  background-color: rgb(105, 173, 61);
    215 }