File: _variables.scss

package info (click to toggle)
firefox 141.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,550,588 kB
  • sloc: cpp: 7,426,506; javascript: 6,367,238; ansic: 3,707,351; python: 1,369,002; xml: 623,983; asm: 426,918; java: 184,324; sh: 64,488; makefile: 19,203; objc: 13,059; perl: 12,955; yacc: 4,583; cs: 3,846; pascal: 3,352; lex: 1,720; ruby: 1,071; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (266 lines) | stat: -rw-r--r-- 8,500 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
@use 'sass:math';

$primary-blue: rgb(0, 97, 224);
$primary-green: rgb(0, 128, 120);
$primary-blue-dark: rgb(0, 221, 255);
$primary-text-color-dark: rgb(43, 42, 51);

// -------------------------------------------------------------------------- //
// Photon colors from http://design.firefox.com/photon/visuals/color.html

$blue-40: #45A1FF;
$blue-50: #0A84FF;
$grey-30: #D7D7DB;
$grey-60: #4A4A4F;
$grey-90: #0C0C0D;
$red-60: #D70022;
$yellow-50: #FFE900;

$grey-90-10: rgba($grey-90, 0.1);
$grey-90-20: rgba($grey-90, 0.2);

$blue-40-40: rgba($blue-40, 0.4);
$blue-50-30: rgba($blue-50, 0.3);

$black: #000;
$black-10: rgba($black, 0.1);
$black-15: rgba($black, 0.15);
$black-20: rgba($black, 0.2);
$black-25: rgba($black, 0.25);
$black-30: rgba($black, 0.3);
$black-40: rgba($black, 0.4);

// -------------------------------------------------------------------------- //
// Other colors

$white: #FFF;
$status-green: #058B00;
$status-dark-green: #7C6;
$bookmark-icon-fill: #0A84FF;
$download-icon-fill: #12BC00;
$pocket-icon-fill: #EF4056;
$email-input-invalid: rgba($red-60, 0.3);

$newtab-wordmark-default-color: #20123A;
$newtab-wordmark-darktheme-color: rgb(251, 251, 254);

$in-content-page-color: rgb(21, 20, 26);
$in-content-page-color-dark: rgb(251, 251, 254);

// -------------------------------------------------------------------------- //
// These colors should match the colors in the default themes
// (toolkit/mozapps/extensions/...). Note that they could get replaced by other
// themes. The color set in --tabpanel-background-color (tabs.inc.css) should
// match these colors here to avoid flashing.

$in-content-page-background: #F9F9FB;
$in-content-page-background-dark: #2B2A33;

$newtab-background-secondary: #FFF;
$newtab-background-secondary-dark: rgb(66, 65, 77);

// Mirrors $newtab-background-secondary with 20% opacity
$newtab-background-card: rgba(255, 255, 255, 80%);
$newtab-background-card-dark: rgb(66, 65, 77, 80%);

// Photon transitions from http://design.firefox.com/photon/motion/duration-and-easing.html
$photon-easing: cubic-bezier(0.07, 0.95, 0, 1);

// Grid related styles
$base-gutter: 32px;
$section-horizontal-padding: 25px;
$vars-section-horizontal-padding: 25px;
$section-vertical-padding: 10px;
$section-spacing: 40px - $section-vertical-padding * 2; // 20px
$grid-unit: 96px; // 1 top site
// New Tab Experience grid unit needs to be smaller, but for now we are changing
// this UI with a pref, so requires duplication.
$grid-unit-small: 80px; // 1 top site

$icon-size: 16px;
$smaller-icon-size: 12px;
$larger-icon-size: 32px;

$searchbar-width-small: ($grid-unit * 2 + $base-gutter * 1) - 24px; // 200px
$searchbar-width-medium: ($grid-unit * 4 + $base-gutter * 3) - 120px; // 360px
$searchbar-width-large: ($grid-unit * 6 + $base-gutter * 5) - 136px; // 600px
$searchbar-width-largest: ($grid-unit * 6 + $base-gutter * 5) - 16px; // 720px

$wrapper-default-width: $grid-unit * 2 + $base-gutter * 1 + $vars-section-horizontal-padding * 2; // 2 top sites
$wrapper-max-width-medium: $grid-unit * 4 + $base-gutter * 3 + $vars-section-horizontal-padding * 2; // 4 top sites
$wrapper-max-width-large: $grid-unit * 6 + $base-gutter * 5 + $vars-section-horizontal-padding * 2; // 6 top sites
$wrapper-max-width-widest: $grid-unit * 8 + $base-gutter * 7 + $vars-section-horizontal-padding * 2; // 8 top sites
$wrapper-max-width-weather: $grid-unit * 12 + $base-gutter * 7 + $vars-section-horizontal-padding * 2; // Weather visible
$wrapper-max-width-ultra-wide: $grid-unit * 14 + $base-gutter * 7 + $vars-section-horizontal-padding * 2; // 8 top sites 4 stories
// For the breakpoints, we need to add space for the scrollbar to avoid weird
// layout issues when the scrollbar is visible. 16px is wide enough to cover all
// OSes and keeps it simpler than a per-OS value.
$scrollbar-width: 16px;

// Breakpoints
// If updating these breakpoints, don't forget to update uses of DSImage, which
// might choose the right image src to use depending on the viewport size
// and the $debug-breakpoints list below
$break-point-small: 510px;
$break-point-medium: $wrapper-max-width-medium + $base-gutter * 2 + $scrollbar-width; // 610px
// A temporary breakpoint for a new layout experiment.
$break-point-layout-variant: 724px;
$break-point-large: $wrapper-max-width-large + $base-gutter * 2 + $scrollbar-width; // 866px
$break-point-widest: $wrapper-max-width-widest + $base-gutter * 2 + $scrollbar-width; // 1122px
// temporary breakpoint for sections experiment
$break-point-sections-variant: 1310px + $base-gutter * 2 + $scrollbar-width; // 1374px
$break-point-weather: $wrapper-max-width-weather + $base-gutter * 2 + $scrollbar-width; // 1506px
$break-point-ultra-wide: $wrapper-max-width-ultra-wide + $base-gutter * 2 + $scrollbar-width; // 1698px

// Used for @include debug-breakpoints in mixins.scss
$debug-breakpoints: (
  small: $break-point-small,
  medium: $break-point-medium,
  large: $break-point-large,
  widest: $break-point-widest,
  sections-variant: $break-point-sections-variant,
  weather: $break-point-weather,
  ultra-wide: $break-point-ultra-wide
);

$debug-breakpoint-colors: (
  small: red,
  medium: orange,
  large: yellow,
  widest: green,
  sections-variant: blue,
  weather: purple,
  ultra-wide: violet
);

$section-title-font-size: var(--font-size-large);

$card-width: $grid-unit-small * 2 + $base-gutter;

$card-height: 266px;
$card-preview-image-height: 122px;
$card-title-margin: 2px;
$card-text-line-height: 19px;

// Larger cards for wider screens:
$card-width-large: 309px;
$card-height-large: 370px;
$card-preview-image-height-large: 155px;

// Compact cards for Highlights
$card-height-compact: 160px;
$card-preview-image-height-compact: 108px;

$topic-margin-block-start: 12px;

$context-menu-button-size: 27px;
$context-menu-button-boxshadow: 0 2px $grey-90-10;
$context-menu-shadow: 0 5px 10px $black-30, 0 0 0 1px $black-20;
$context-menu-font-size: inherit;

// $context-menu-border-radius: 5px;
$context-menu-outer-padding: 5px;
$context-menu-item-padding: 3px 12px;

$error-fallback-font-size: var(--font-size-small);

$image-path: 'chrome://newtab/content/data/content/assets/';

$textbox-shadow-size: 4px;

$customize-menu-slide-bezier: cubic-bezier(0.46, 0.03, 0.52, 0.96);
$customize-menu-expand-bezier: cubic-bezier(0.82, 0.085, 0.395, 0.895);
$customize-menu-border-tint: 1px solid rgba(0, 0, 0, 15%);

@mixin fade-in {
  box-shadow: inset $inner-box-shadow, $shadow-primary;
  transition: box-shadow 150ms;
}

@mixin fade-in-card {
  box-shadow: $shadow-primary;
  transition: box-shadow 150ms;
}

@mixin ds-focus {
  border: 0;
  outline: var(--focus-outline);
}

@mixin context-menu-button {
  .context-menu-button {
    background-clip: padding-box;
    background-color: var(--newtab-button-background);
    background-image: url('chrome://global/skin/icons/more.svg');
    background-position: 50.1%;
    border: 0;
    outline: $border-primary;
    outline-width: 0;
    border-radius: var(--border-radius-circle);
    cursor: pointer;
    color: var(--button-text-color);
    fill: var(--newtab-button-text);
    height: $context-menu-button-size;
    inset-inline-end: calc(var(--space-medium) * -1);
    opacity: 0;
    position: absolute;
    inset-block-start: calc(var(--space-medium) * -1);
    transform: scale(0.25);
    transition-duration: 150ms;
    transition-property: transform, opacity;
    width: $context-menu-button-size;

    &:is(:active, :focus-visible, :hover) {
      opacity: 1;
      transform: scale(1);
    }

    &:is(:hover) {
      background-color: var(--newtab-button-hover-background);
    }

    &:is(:focus-visible) {
      outline-color: var(--newtab-button-focus-border);
      background-color: var(--newtab-button-focus-background);
      outline-width: 4px;
    }

    &:is(:active) {
      background-color: var(--newtab-button-active-background);
    }


  }
}

@mixin context-menu-button-hover {
  .context-menu-button {
    opacity: 1;
    transform: scale(1);
    transition-delay: 333ms;
  }
}

@mixin context-menu-open-middle {
  .context-menu {
    margin-inline-end: auto;
    margin-inline-start: auto;
    inset-inline-end: auto;
    inset-inline-start: calc(var(--space-xxlarge) * -1);
  }
}

@mixin context-menu-open-left {
  .context-menu {
    margin-inline-end: var(--space-xsmall);
    margin-inline-start: auto;
    inset-inline-end: 0;
    inset-inline-start: auto;
  }
}

@mixin flip-icon {
  &:dir(rtl) {
    transform: scaleX(-1);
  }
}