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/. */
6 * When making changes, follow the example of the AboutWelcome messaging surface for font sizes, line heights,
7 * etc. See: https://searchfox.org/mozilla-central/source/browser/components/aboutwelcome/content-src/aboutwelcome.scss
11 --introduction-magglass-logo-height: 128px;
12 --introduction-firefox-logo-height: 72px;
13 --introduction-image-height: 224px;
14 --main-magglass-logo-height: 64px;
15 --main-firefox-logo-height: 50px;
16 --x-large-margin: 40px;
18 --large-margin-const: 24px;
20 --small-margin-const: 16px;
21 --x-small-margin-const: 8px;
22 --section-vertical-padding: 32px;
23 --section-horizontal-padding: 64px;
27 --introduction-image-height: 183px;
28 --main-magglass-logo-height: 48px;
29 --main-firefox-logo-height: 32px;
30 --x-large-margin: 20px;
33 --section-vertical-padding: 16px;
34 --section-horizontal-padding: 32px;
36 /* 15px is the non-compact font-size. */
48 justify-content: center
;
49 flex-direction: column
;
51 padding: var
(--section-vertical-padding
) var
(--section-horizontal-padding
);
52 /* This is the largest approximate natural height of the main section across
53 platforms and dialog variations, erring on the side of being slightly
54 larger than necessary. If you change this, also update COMPACT_MODE_HEIGHT
59 body
.compact section
{
60 /* This is the largest approximate natural height of the main section across
61 platforms and dialog variations in compact mode, erring on the side of
62 being slightly larger than necessary. */
75 white-space: pre-line
;
79 background-repeat: no-repeat
;
80 background-position: center
;
81 background-size: contain
;
85 .description-section {
86 /* The effective visual margin between the description and first option should
87 be --large-margin-const. Each child in the description has a bottom margin
88 of --small-margin, so subtract it from --large-margin-const. */
89 margin-block: 0 calc
(var
(--large-margin-const
) - var
(--small-margin
));
96 margin-block: 0 var
(--small-margin
);
97 white-space: pre-line
;
103 margin-block: 0 var
(--small-margin
);
107 display: inline-block
;
111 background-color: var
(--in-content-border-color
);
116 background-color: var
(--in-content-primary-button-background
);
119 #introduction-section .logo
{
120 background-image: url
("quicksuggestOnboarding_magglass.svg");
121 height: var
(--introduction-magglass-logo-height
);
122 margin-block-end: var
(--large-margin
);
125 #introduction-section .logo
.firefox
{
126 background-image: url
("chrome://branding/content/about-logo.svg");
127 height: var
(--introduction-firefox-logo-height
);
130 @media (prefers-reduced-motion: no-preference
) {
131 #introduction-section .logo
{
132 background-image: url
("quicksuggestOnboarding_magglass_animation.svg");
136 #introduction-section .title
{
137 margin-block-end: var
(--x-large-margin
);
140 #introduction-image {
141 height: var
(--introduction-image-height
);
142 background-image: url
("suggest-example.svg");
143 background-size: contain
;
144 background-repeat: no-repeat
;
145 background-position: center
;
146 margin-block: var
(--large-margin
);
150 #introduction-section.layout-100
.logo
{
151 height: var
(--main-firefox-logo-height
);
154 #introduction-section.layout-100
.title
{
155 margin-block: 0 var
(--small-margin
);
158 #introduction-section:not
(.layout-100
) .description-section
{
173 #onboardingClose img
{
174 -moz-context-properties: fill
;
178 #main-section:not
(.active
) {
182 #main-section .logo
{
183 background-image: url
("quicksuggestOnboarding_magglass.svg");
184 height: var
(--main-magglass-logo-height
);
185 margin-block-end: var
(--large-margin
);
188 #main-section .logo
.firefox
{
189 background-image: url
("chrome://branding/content/about-logo.svg");
190 height: var
(--main-firefox-logo-height
);
193 #main-section .title
{
194 margin-block: 0 var
(--small-margin
);
197 #main-section .privacy-first:not
(.active
) {
201 #main-section .option
{
203 border: 2px solid var
(--in-content-box-info-background
);
206 /* Use --small-margin-const for the horizontal padding to make the option's
207 horizontal padding larger than the vertical padding in compact mode. The
208 radio button and text are too close to the left and right edges of the
209 option's border otherwise. */
210 padding: var
(--small-margin
) var
(--small-margin-const
);
214 #main-section .option
.selected
{
215 border-color: var
(--in-content-primary-button-background
);
218 #main-section .option
.accept
{
219 margin-block-end: var
(--small-margin
);
222 #main-section .option
.reject
{
223 margin-block-end: var
(--large-margin-const
);
226 #main-section .option
> label
{
227 /* Make the whole option area selectable for the radio button. 22px is the
228 width of the radio button and its inline margin. */
229 padding-block: var
(--small-margin
);
230 padding-inline-start: calc
(22px + var
(--small-margin-const
));
231 padding-inline-end: var
(--small-margin-const
);
232 margin-block: calc
(-1 * var
(--small-margin
));
233 margin-inline-start: calc
(-1 * (22px + var
(--small-margin-const
)));
234 margin-inline-end: calc
(-1 * var
(--small-margin-const
));
237 body:not
(.compact
) #main-section
.option
> input
{
238 /* Vertically align the radio button with the .option-label. */
239 margin-block-start: 0.25em;
242 #main-section .option-label
{
245 margin-block-end: 2px;
248 #main-section .option-description
{
254 flex-direction: column
;
259 margin-block-end: var
(--large-margin
);
262 #onboardingSkipLink {
263 margin-block-end: var
(--x-small-margin-const
);
266 /* transition from introduction to main */
267 #introduction-section.inactive
{
268 /* Avoid including this section size */
270 pointer-events: none
;
271 animation: fadeout
0.3s forwards
;
274 #main-section.active
{
275 animation: fadein
0.3s forwards
;
293 pointer-events: initial
;
298 /* Show main only without transition */
299 body
.skip-introduction #introduction-section
.inactive
{
304 body
.skip-introduction #main-section
.active
{
306 pointer-events: initial
;
309 body
.skip-introduction
.pager
{