|
| 1 | +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file |
| 2 | +// for details. All rights reserved. Use of this source code is governed by a |
| 3 | +// BSD-style license that can be found in the LICENSE file. |
| 4 | + |
| 5 | +/// styles/variables.scss: |
| 6 | +/// |
| 7 | +/// Mixins that can be included to load CSS custom properties (variables) |
| 8 | +/// into any desired scope. |
| 9 | + |
| 10 | +/// Shared typography CSS variables. |
| 11 | +@mixin typography { |
| 12 | + /// Used for body text and smaller UI elements, like labels. |
| 13 | + --dash-default-fontFamily: 'Roboto', sans-serif; |
| 14 | + |
| 15 | + /// Used for headlines, titles, and larger UI elements. |
| 16 | + --dash-display-fontFamily: 'Roboto', sans-serif; |
| 17 | + |
| 18 | + /// Used for monospace text, such as code blocks. |
| 19 | + --dash-mono-fontFamily: 'Roboto Mono', 'Source Code Pro', 'Cascadia Mono', 'JetBrains Mono', monospace; |
| 20 | + |
| 21 | + /// Used for icons, such as the magnifying glass for search. |
| 22 | + --dash-symbol-fontFamily: 'Material Symbols', 'Material Symbols Outlined'; |
| 23 | +} |
| 24 | + |
| 25 | +/// Color-related, theme-agnostic CSS variables. |
| 26 | +@mixin shared-colors { |
| 27 | + |
| 28 | +} |
| 29 | + |
| 30 | +/// Light-theme specific CSS variables. |
| 31 | +@mixin light-theme { |
| 32 | + /// The default text color, used for body text. |
| 33 | + --dash-surface-fgColor: #4a4a4a; |
| 34 | +} |
| 35 | + |
| 36 | +/// Dark-theme specific CSS variables. |
| 37 | +@mixin dark-theme { |
| 38 | + --dash-surface-fgColor: #dcdcdc; |
| 39 | +} |
| 40 | + |
| 41 | +/// CSS variables that specify values that can only be used by Google sites, |
| 42 | +/// such as enabling the Google Sans font families. |
| 43 | +/// |
| 44 | +/// These overrides should be included after all other variables are defined. |
| 45 | +@mixin google-overrides { |
| 46 | + // Non-Google sites, such as self-hosted API docs, |
| 47 | + // can't use Google Sans or Google Symbols. |
| 48 | + --dash-default-fontFamily: 'Google Sans Text', 'Google Sans', 'Roboto', sans-serif; |
| 49 | + --dash-display-fontFamily: 'Google Sans', 'Google Sans Text', 'Roboto', sans-serif; |
| 50 | + --dash-mono-fontFamily: 'Google Sans Mono', 'Roboto Mono', 'Source Code Pro', 'Cascadia Mono', 'JetBrains Mono', monospace; |
| 51 | + --dash-symbol-fontFamily: 'Google Symbols', 'Material Symbols', 'Material Symbols Outlined'; |
| 52 | +} |
0 commit comments