From fed80ee7caed028330f6460cb05845b7d34ba689 Mon Sep 17 00:00:00 2001 From: v8tenko Date: Wed, 10 May 2023 12:47:01 +0300 Subject: [PATCH] fix!: font from variable --- package-lock.json | 1 + package.json | 2 +- src/scss/_common.scss | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8dc1c104..dab5f3f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3992,6 +3992,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.6.2.tgz", "integrity": "sha512-7Lu2zMQnmHHQGKXVvCOhSziQMpa+R2hMHFefzbYoYMHeaXR0uXqNeOc3JeQQQ8/6Xa2Br/P1IQTLzV09xxAiUQ==", + "dev": true, "requires": { "htmlparser2": "^6.0.0" } diff --git a/package.json b/package.json index 9990c090..bd0ea8d2 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "prepublishOnly": "npm run lint && npm run test && npm run build" }, "dependencies": { - "@types/sanitize-html": "2.6.2", "chalk": "4.1.2", "get-root-node-polyfill": "1.0.0", "github-slugger": "1.4.0", @@ -62,6 +61,7 @@ "@types/markdown-it-attrs": "4.1.0", "@types/markdownlint": "0.18.0", "@types/node": "17.0.10", + "@types/sanitize-html": "2.6.2", "@yandex-cloud/eslint-config": "^1.1.0", "@yandex-cloud/prettier-config": "^1.0.0", "@yandex-cloud/tsconfig": "^1.0.0", diff --git a/src/scss/_common.scss b/src/scss/_common.scss index d3447ffd..ef39d0e8 100644 --- a/src/scss/_common.scss +++ b/src/scss/_common.scss @@ -1,7 +1,7 @@ @import 'variables'; .yfm { - font-family: 'YS Text', 'Segoe UI', Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + font-family: var(--yc-font-family-sans); font-size: 15px; line-height: 20px; word-wrap: break-word; @@ -123,7 +123,7 @@ code, kbd, pre { - font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Ubuntu Mono', 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', 'Courier', monospace; + font-family: var(--yc-font-family-sans); font-size: 1em; font-feature-settings: normal; } @@ -352,4 +352,6 @@ --yfm-color-hljs-addition: #397300; --yfm-color-hljs-meta: #1f7199; --yfm-color-hljs-meta-string: #4d99bf; + --yfm-font-family-monospace: "Menlo", "Monaco", "Consolas", "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", "Courier", monospace; + --yfm-font-family-sans: 'Segoe UI', Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; }