Skip to content

Commit d5321d5

Browse files
committed
fix: variable color
1 parent db0b7ed commit d5321d5

File tree

5 files changed

+46
-5
lines changed

5 files changed

+46
-5
lines changed

docs/.vitepress/config.mts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { defineConfig } from "vitepress";
22
import { figure } from "@mdit/plugin-figure";
33
import { tasklist } from "@mdit/plugin-tasklist";
4+
import path from 'path';
5+
6+
const __dirname = path.resolve();
47

58
const info = {
69
title: "Aplós",
@@ -130,13 +133,19 @@ export default defineConfig({
130133
ssr: {
131134
noExternal: ["vitepress-plugin-testcomponents"],
132135
},
136+
resolve: {
137+
alias: {
138+
'@': path.resolve(__dirname, '../src')
139+
}
140+
},
133141
css: {
134142
preprocessorOptions: {
135143
scss: {
136144
api: "modern-compiler",
137145
additionalData: `
138-
$color-accent: ${info.accentColor};
139-
$bg-color-code-l: #ffffff;
146+
@use "@/styles/variables-color" with (
147+
$color-accent: ${info.accentColor}
148+
);
140149
`,
141150
},
142151
},

fonts.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$main-font: "Inter", sans-serif;
2+
$variable-font: "InterVariable", sans-serif;
3+
4+
@mixin fontSetting {
5+
--main-mono: "Geist Mono", monospace;
6+
7+
font-feature-settings:
8+
"liga" 1,
9+
"calt" 1,
10+
"cv05" 1;
11+
text-wrap: pretty;
12+
scroll-behavior: smooth;
13+
font-family: $main-font;
14+
15+
@supports (font-variation-settings: normal) {
16+
font-family: $variable-font;
17+
}
18+
}
19+
20+
:root,
21+
html,
22+
body {
23+
@include fontSetting;
24+
}
25+
26+
body {
27+
color: var(--color-text);
28+
font-weight: 400;
29+
font-size: medium;
30+
font-synthesis: style;
31+
text-rendering: optimizeLegibility;
32+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aplos",
3-
"version": "3.0.0-6",
3+
"version": "3.0.0-7",
44
"type": "module",
55
"description": "A sleek, contemporary, and purposefully designed VitePress theme",
66
"main": "index.ts",

src/styles/_colors.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use "sass:color";
2-
3-
$color-accent: #acbdb0 !default;
2+
@use './variables-color' as *;
43

54
$color-accent-l: color.scale($color-accent, $lightness: -60%) !default;
65
$color-accent-d: color.scale($color-accent, $lightness: 60%) !default;

src/styles/_variables-color.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$color-accent: #acbdb0 !default;

0 commit comments

Comments
 (0)