|
| 1 | +/** |
| 2 | + * Customize default theme styling by overriding CSS variables: |
| 3 | + * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css |
| 4 | + */ |
| 5 | + |
| 6 | +/** |
| 7 | + * Fonts |
| 8 | + */ |
| 9 | + |
| 10 | +@font-face { |
| 11 | + font-family: "Geist"; |
| 12 | + src: url("/assets/GeistVariableVF.woff2") format("woff2"); |
| 13 | +} |
| 14 | + |
| 15 | +@font-face { |
| 16 | + font-family: "Geist Mono"; |
| 17 | + src: url("/assets/GeistMonoVariableVF.woff2") format("woff2"); |
| 18 | +} |
| 19 | + |
| 20 | +:root { |
| 21 | + --vp-font-family-mono: ui-monospace, "Geist Mono", SFMono-Regular, "SF Mono", |
| 22 | + Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; |
| 23 | +} |
| 24 | + |
| 25 | +/** |
| 26 | + * Colors |
| 27 | + * |
| 28 | + * Each colors have exact same color scale system with 3 levels of solid |
| 29 | + * colors with different brightness, and 1 soft color. |
| 30 | + * |
| 31 | + * - `XXX-1`: The most solid color used mainly for colored text. It must |
| 32 | + * satisfy the contrast ratio against when used on top of `XXX-soft`. |
| 33 | + * |
| 34 | + * - `XXX-2`: The color used mainly for hover state of the button. |
| 35 | + * |
| 36 | + * - `XXX-3`: The color for solid background, such as bg color of the button. |
| 37 | + * It must satisfy the contrast ratio with pure white (#ffffff) text on |
| 38 | + * top of it. |
| 39 | + * |
| 40 | + * - `XXX-soft`: The color used for subtle background such as custom container |
| 41 | + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors |
| 42 | + * on top of it. |
| 43 | + * |
| 44 | + * The soft color must be semi transparent alpha channel. This is crucial |
| 45 | + * because it allows adding multiple "soft" colors on top of each other |
| 46 | + * to create a accent, such as when having inline code block inside |
| 47 | + * custom containers. |
| 48 | + * |
| 49 | + * - `default`: The color used purely for subtle indication without any |
| 50 | + * special meanings attched to it such as bg color for menu hover state. |
| 51 | + * |
| 52 | + * - `brand`: Used for primary brand colors, such as link text, button with |
| 53 | + * brand theme, etc. |
| 54 | + * |
| 55 | + * - `tip`: Used to indicate useful information. The default theme uses the |
| 56 | + * brand color for this by default. |
| 57 | + * |
| 58 | + * - `warning`: Used to indicate warning to the users. Used in custom |
| 59 | + * container, badges, etc. |
| 60 | + * |
| 61 | + * - `danger`: Used to show error, or dangerous message to the users. Used |
| 62 | + * in custom container, badges, etc. |
| 63 | + * -------------------------------------------------------------------------- */ |
| 64 | + |
| 65 | +:root { |
| 66 | + --vp-c-default-1: var(--vp-c-gray-1); |
| 67 | + --vp-c-default-2: var(--vp-c-gray-2); |
| 68 | + --vp-c-default-3: var(--vp-c-gray-3); |
| 69 | + --vp-c-default-soft: var(--vp-c-gray-soft); |
| 70 | + |
| 71 | + --vp-c-brand-1: oklch(0.6 0.22 260); |
| 72 | + --vp-c-brand-2: oklch(0.4 0.2 260); |
| 73 | + --vp-c-brand-3: oklch(0.5 0.2 260); |
| 74 | + --vp-c-brand-soft: oklch(0.6 0.22 260/0.1); |
| 75 | + |
| 76 | + --vp-c-tip-1: var(--vp-c-brand-1); |
| 77 | + --vp-c-tip-2: var(--vp-c-brand-2); |
| 78 | + --vp-c-tip-3: var(--vp-c-brand-3); |
| 79 | + --vp-c-tip-soft: var(--vp-c-brand-soft); |
| 80 | + |
| 81 | + --vp-c-warning-1: var(--vp-c-yellow-1); |
| 82 | + --vp-c-warning-2: var(--vp-c-yellow-2); |
| 83 | + --vp-c-warning-3: var(--vp-c-yellow-3); |
| 84 | + --vp-c-warning-soft: var(--vp-c-yellow-soft); |
| 85 | + |
| 86 | + --vp-c-danger-1: var(--vp-c-red-1); |
| 87 | + --vp-c-danger-2: var(--vp-c-red-2); |
| 88 | + --vp-c-danger-3: var(--vp-c-red-3); |
| 89 | + --vp-c-danger-soft: var(--vp-c-red-soft); |
| 90 | +} |
| 91 | + |
| 92 | +/** |
| 93 | + * Component: Button |
| 94 | + * -------------------------------------------------------------------------- */ |
| 95 | + |
| 96 | +:root { |
| 97 | + --vp-button-brand-border: transparent; |
| 98 | + --vp-button-brand-text: var(--vp-c-white); |
| 99 | + --vp-button-brand-bg: var(--vp-c-brand-3); |
| 100 | + --vp-button-brand-hover-border: transparent; |
| 101 | + --vp-button-brand-hover-text: var(--vp-c-white); |
| 102 | + --vp-button-brand-hover-bg: var(--vp-c-brand-2); |
| 103 | + --vp-button-brand-active-border: transparent; |
| 104 | + --vp-button-brand-active-text: var(--vp-c-white); |
| 105 | + --vp-button-brand-active-bg: var(--vp-c-brand-1); |
| 106 | +} |
| 107 | + |
| 108 | +/** |
| 109 | + * Component: Home |
| 110 | + * -------------------------------------------------------------------------- */ |
| 111 | + |
| 112 | +:root { |
| 113 | + --vp-home-hero-name-color: transparent; |
| 114 | + --vp-home-hero-name-background: -webkit-linear-gradient( |
| 115 | + 120deg, |
| 116 | + var(--vp-c-brand-1) 30%, |
| 117 | + var(--vp-c-brand-2) |
| 118 | + ); |
| 119 | + |
| 120 | + --vp-home-hero-image-background-image: linear-gradient( |
| 121 | + -45deg, |
| 122 | + var(--vp-c-brand-1) 50%, |
| 123 | + var(--vp-c-brand-2) |
| 124 | + ); |
| 125 | + --vp-home-hero-image-filter: blur(44px); |
| 126 | +} |
| 127 | + |
| 128 | +@media (min-width: 640px) { |
| 129 | + :root { |
| 130 | + --vp-home-hero-image-filter: blur(56px); |
| 131 | + } |
| 132 | +} |
| 133 | + |
| 134 | +@media (min-width: 960px) { |
| 135 | + :root { |
| 136 | + --vp-home-hero-image-filter: blur(68px); |
| 137 | + } |
| 138 | +} |
| 139 | + |
| 140 | +/** |
| 141 | + * Component: Custom Block |
| 142 | + * -------------------------------------------------------------------------- */ |
| 143 | + |
| 144 | +:root { |
| 145 | + --vp-custom-block-tip-border: transparent; |
| 146 | + --vp-custom-block-tip-text: var(--vp-c-text-1); |
| 147 | + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); |
| 148 | + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); |
| 149 | +} |
| 150 | + |
| 151 | +/** |
| 152 | + * Component: Algolia |
| 153 | + * -------------------------------------------------------------------------- */ |
| 154 | + |
| 155 | +.DocSearch { |
| 156 | + --docsearch-primary-color: var(--vp-c-brand-1) !important; |
| 157 | +} |
0 commit comments