Skip to content

Commit de51b9a

Browse files
hawkgsatscott
authored andcommitted
docs(docs-infra): fix home animation text width on small devices; fix snackbar colors (angular#60745)
The text used to exceed the viewport width. PR Close angular#60745
1 parent 1b36f6e commit de51b9a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

adev/shared-docs/styles/_colors.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '@angular/material' as mat;
2+
13
// Colors
24
// Using OKLCH color space for better color reproduction on P3 displays,
35
// as well as better human-readability
@@ -186,9 +188,6 @@
186188
// for the "unfilled" portion of the word that hasn't
187189
// been highlighted by the gradient
188190
--gray-unfilled: var(--gray-400);
189-
// TODO: convert oklch to hex at build time
190-
--webgl-page-background: #ffffff;
191-
--webgl-gray-unfilled: #a39fa9;
192191
}
193192

194193
@mixin dark-mode-definitions() {
@@ -254,9 +253,6 @@
254253

255254
// Home page - dark mode
256255
--gray-unfilled: var(--gray-700);
257-
// TODO: convert oklch to hex at build time
258-
--webgl-page-background: #0f0f11;
259-
--webgl-gray-unfilled: #413e46;
260256

261257
.docs-toggle {
262258
input {
@@ -268,9 +264,13 @@
268264
}
269265

270266
@mixin mdc-definitions() {
271-
--mdc-snackbar-container-shape: 0.25rem;
272-
--mdc-snackbar-container-color: var(--page-background);
273-
--mdc-snackbar-supporting-text-color: var(--primary-contrast);
267+
@include mat.snack-bar-overrides(
268+
(
269+
container-shape: 0.25rem,
270+
container-color: var(--page-background),
271+
supporting-text-color: var(--primary-contrast),
272+
)
273+
);
274274
}
275275

276276
// LIGHT MODE (Explicit)

adev/src/app/features/home/components/home-animation/home-animation.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $transition: 200ms linear;
4949
color: var(--quaternary-contrast);
5050
font-size: clamp(1rem, 1vw, 2rem);
5151
line-height: 1.5;
52-
width: clamp(375px, 50%, 600px);
52+
width: clamp(345px, 50%, 600px);
5353
margin: 0 auto;
5454
}
5555

@@ -91,6 +91,8 @@ $transition: 200ms linear;
9191
& {
9292
top: 6rem;
9393
left: var(--layout-padding);
94+
/* Assuming the container width is identical to the viewport width (mobile device). */
95+
max-width: calc(100% - var(--layout-padding) * 2);
9496
}
9597
}
9698

0 commit comments

Comments
 (0)