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+ * Colors
8+ *
9+ * Each colors have exact same color scale system with 3 levels of solid
10+ * colors with different brightness, and 1 soft color.
11+ *
12+ * - `XXX-1`: The most solid color used mainly for colored text. It must
13+ * satisfy the contrast ratio against when used on top of `XXX-soft`.
14+ *
15+ * - `XXX-2`: The color used mainly for hover state of the button.
16+ *
17+ * - `XXX-3`: The color for solid background, such as bg color of the button.
18+ * It must satisfy the contrast ratio with pure white (#ffffff) text on
19+ * top of it.
20+ *
21+ * - `XXX-soft`: The color used for subtle background such as custom container
22+ * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
23+ * on top of it.
24+ *
25+ * The soft color must be semi transparent alpha channel. This is crucial
26+ * because it allows adding multiple "soft" colors on top of each other
27+ * to create a accent, such as when having inline code block inside
28+ * custom containers.
29+ *
30+ * - `default`: The color used purely for subtle indication without any
31+ * special meanings attched to it such as bg color for menu hover state.
32+ *
33+ * - `brand`: Used for primary brand colors, such as link text, button with
34+ * brand theme, etc.
35+ *
36+ * - `tip`: Used to indicate useful information. The default theme uses the
37+ * brand color for this by default.
38+ *
39+ * - `warning`: Used to indicate warning to the users. Used in custom
40+ * container, badges, etc.
41+ *
42+ * - `danger`: Used to show error, or dangerous message to the users. Used
43+ * in custom container, badges, etc.
44+ * -------------------------------------------------------------------------- */
45+
46+ : root {
47+ --vp-c-indigo-1 : # c87a45 ;
48+ --vp-c-indigo-2 : # ff8a4f ;
49+ --vp-c-indigo-3 : # fb681f ;
50+ --vp-c-indigo-soft : # ff82512b ;
51+ }
52+
53+ html .dark {
54+ --vp-c-indigo-1 : # ffae77 ;
55+ --vp-c-indigo-2 : # ff8a4f ;
56+ --vp-c-indigo-3 : # fb681f ;
57+ --vp-c-indigo-soft : # ff662069 ;
58+ }
59+
60+ : root {
61+ --vp-c-default-1 : var (--vp-c-gray-1 );
62+ --vp-c-default-2 : var (--vp-c-gray-2 );
63+ --vp-c-default-3 : var (--vp-c-gray-3 );
64+ --vp-c-default-soft : var (--vp-c-gray-soft );
65+
66+ --vp-c-brand-1 : var (--vp-c-indigo-1 );
67+ --vp-c-brand-2 : var (--vp-c-indigo-2 );
68+ --vp-c-brand-3 : var (--vp-c-indigo-3 );
69+ --vp-c-brand-soft : var (--vp-c-indigo-soft );
70+
71+ --vp-c-tip-1 : var (--vp-c-brand-1 );
72+ --vp-c-tip-2 : var (--vp-c-brand-2 );
73+ --vp-c-tip-3 : var (--vp-c-brand-3 );
74+ --vp-c-tip-soft : var (--vp-c-brand-soft );
75+
76+ --vp-c-warning-1 : var (--vp-c-yellow-1 );
77+ --vp-c-warning-2 : var (--vp-c-yellow-2 );
78+ --vp-c-warning-3 : var (--vp-c-yellow-3 );
79+ --vp-c-warning-soft : var (--vp-c-yellow-soft );
80+
81+ --vp-c-danger-1 : var (--vp-c-red-1 );
82+ --vp-c-danger-2 : var (--vp-c-red-2 );
83+ --vp-c-danger-3 : var (--vp-c-red-3 );
84+ --vp-c-danger-soft : var (--vp-c-red-soft );
85+ }
86+
87+ /**
88+ * Component: Button
89+ * -------------------------------------------------------------------------- */
90+
91+ : root {
92+ --vp-button-brand-border : transparent;
93+ --vp-button-brand-text : var (--vp-c-white );
94+ --vp-button-brand-bg : var (--vp-c-brand-3 );
95+ --vp-button-brand-hover-border : transparent;
96+ --vp-button-brand-hover-text : var (--vp-c-white );
97+ --vp-button-brand-hover-bg : var (--vp-c-brand-2 );
98+ --vp-button-brand-active-border : transparent;
99+ --vp-button-brand-active-text : var (--vp-c-white );
100+ --vp-button-brand-active-bg : var (--vp-c-brand-1 );
101+ }
102+
103+ /**
104+ * Component: Home
105+ * -------------------------------------------------------------------------- */
106+
107+ : root {
108+ --vp-home-hero-name-color : transparent;
109+ --vp-home-hero-name-background : -webkit-linear-gradient (120deg , # ff1148 30% , # ff7a32 );
110+ --vp-home-hero-image-background-image : linear-gradient (-45deg , # ff542f 50% , # ffbbcf 50% );
111+ --vp-home-hero-image-filter : blur (44px );
112+ }
113+
114+ html .dark {
115+ --vp-home-hero-image-background-image : linear-gradient (-45deg , # ff510b 50% , # ff243d 50% );
116+ }
117+
118+ @media (min-width : 640px ) {
119+ : root {
120+ --vp-home-hero-image-filter : blur (56px );
121+ }
122+ }
123+
124+ @media (min-width : 960px ) {
125+ : root {
126+ --vp-home-hero-image-filter : blur (68px );
127+ }
128+ }
129+
130+ /**
131+ * Component: Custom Block
132+ * -------------------------------------------------------------------------- */
133+
134+ : root {
135+ --vp-custom-block-tip-border : transparent;
136+ --vp-custom-block-tip-text : var (--vp-c-text-1 );
137+ --vp-custom-block-tip-bg : var (--vp-c-brand-soft );
138+ --vp-custom-block-tip-code-bg : var (--vp-c-brand-soft );
139+ }
140+
141+ .i-logos\:mobx-icon {
142+ background : url (/mobx.svg) no-repeat;
143+ background-size : 100% 100% ;
144+ background-color : transparent;
145+ width : 1.2em ;
146+ height : 1.2em ;
147+ }
148+
149+ /**
150+ * Component: Algolia
151+ * -------------------------------------------------------------------------- */
152+
153+ .DocSearch {
154+ --docsearch-primary-color : var (--vp-c-brand-1 ) !important ;
155+ }
156+
157+ @keyframes logoBgGradientAnimate {
158+ 0% {
159+ background-position : 0% 0% ;
160+ transform : scale (1 ) translate (-50% , -50% );
161+ }
162+ 50% {
163+ background-position : 300% 300% ;
164+ transform : scale (1.4 ) translate (-35% , -35% );
165+ }
166+ 100% {
167+ background-position : 0% 0% ;
168+ transform : scale (1 ) translate (-50% , -50% );
169+ }
170+ }
171+
172+ .image-container > .image-bg {
173+ background-size : 200% 200% ;
174+ animation : logoBgGradientAnimate 7s linear infinite;
175+ }
176+
177+ @keyframes logoAnimate {
178+ 0% {
179+ transform : scale (1 ) translate (-50% , -50% );
180+ }
181+ 50% {
182+ transform : scale (1.05 ) translate (-48% , -48% );
183+ }
184+ 100% {
185+ transform : scale (1 ) translate (-50% , -50% );
186+ }
187+ }
188+
189+ .image-container > .image-src {
190+ animation : logoAnimate 10s linear infinite;
191+ }
0 commit comments