From 33b1fa2002056baffcb93ff83006128899a380ea Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Thu, 26 Sep 2024 10:48:15 +0200 Subject: [PATCH] Export fonts variables. --- package.json | 2 +- src/styles/_common.less | 4 ++-- src/styles/_fonts.less | 13 ++++++++++--- src/styles/components/_steps-counter.less | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 099cc80..f6a49d8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.6.1", + "version": "1.6.2", "name": "@kernelui/core", "description": "Kernel UI Core.", "scripts": { diff --git a/src/styles/_common.less b/src/styles/_common.less index 242f973..055dc73 100644 --- a/src/styles/_common.less +++ b/src/styles/_common.less @@ -7,13 +7,13 @@ html, body html, body, input, button, textarea { font-size: 1em; - font-family: @sans-serif-fonts; + font-family: var(--sans-serif-fonts); font-weight: 500; } pre, code { - font-family: @monospace-fonts; + font-family: var(--monospace-fonts); } body diff --git a/src/styles/_fonts.less b/src/styles/_fonts.less index 687ef36..75f27ea 100644 --- a/src/styles/_fonts.less +++ b/src/styles/_fonts.less @@ -2,6 +2,13 @@ @import "@fontsource-variable/source-serif-4"; @import "@fontsource-variable/jetbrains-mono"; -@sans-serif-fonts: "Manrope Variable", sans-serif; -@serif-fonts: "Source Serif 4 Variable", serif; -@monospace-fonts: "Jetbrains Mono Variable", monospace; +:root +{ + @sans-serif-fonts: "Manrope Variable", sans-serif; + @serif-fonts: "Source Serif 4 Variable", serif; + @monospace-fonts: "Jetbrains Mono Variable", monospace; + + --sans-serif-fonts: @sans-serif-fonts; + --serif-fonts: @serif-fonts; + --monospace-fonts: @monospace-fonts; +} diff --git a/src/styles/components/_steps-counter.less b/src/styles/components/_steps-counter.less index d6be5f0..a3b291d 100644 --- a/src/styles/components/_steps-counter.less +++ b/src/styles/components/_steps-counter.less @@ -13,7 +13,7 @@ color: var(--primary); - font-family: @monospace-fonts; + font-family: var(--monospace-fonts); font-size: 1.5em; font-weight: 700; vertical-align: baseline;