From f94f0aa063677f1c87d4ee77c395a95eba2fccf7 Mon Sep 17 00:00:00 2001 From: Yuriy Demidov Date: Tue, 4 Oct 2022 12:39:02 +0300 Subject: [PATCH] chore: update linters configs --- .eslintrc | 2 +- .prettierrc.js | 2 +- .stylelintrc | 6 +- demo/.eslintrc | 2 +- demo/Playground.scss | 4 +- package-lock.json | 225 +++++++++--------- package.json | 13 +- src/.eslintrc | 2 +- src/extensions/behavior/Cursor/gapcursor.scss | 12 +- .../behavior/Placeholder/index.scss | 16 +- src/extensions/markdown/Code/code.scss | 7 +- src/extensions/yfm/Checkbox/index.scss | 4 +- src/extensions/yfm/Math/view-and-edit.scss | 11 +- src/toolbar/FlexToolbar.scss | 1 + src/toolbar/Toolbar.scss | 1 + src/toolbar/ToolbarButton.scss | 2 +- 16 files changed, 175 insertions(+), 135 deletions(-) diff --git a/.eslintrc b/.eslintrc index 582979e4..699ccdb4 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,4 @@ { - "extends": ["@yandex-cloud/eslint-config", "@yandex-cloud/eslint-config/prettier"], + "extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"], "root": true } diff --git a/.prettierrc.js b/.prettierrc.js index c2286dc2..4bab6f6f 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1 +1 @@ -module.exports = require("@yandex-cloud/prettier-config"); +module.exports = require("@gravity-ui/prettier-config"); diff --git a/.stylelintrc b/.stylelintrc index 3384c742..7e9d6e2e 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,3 +1,7 @@ { - "extends": ["@yandex-cloud/stylelint-config", "@yandex-cloud/stylelint-config/prettier"] + "extends": [ + "@gravity-ui/stylelint-config", + "@gravity-ui/stylelint-config/order", + "@gravity-ui/stylelint-config/prettier" + ] } diff --git a/demo/.eslintrc b/demo/.eslintrc index 9e3fa058..9ecc6200 100644 --- a/demo/.eslintrc +++ b/demo/.eslintrc @@ -1,3 +1,3 @@ { - "extends": "@yandex-cloud/eslint-config/client" + "extends": "@gravity-ui/eslint-config/client" } diff --git a/demo/Playground.scss b/demo/Playground.scss index cefac852..00f0c678 100644 --- a/demo/Playground.scss +++ b/demo/Playground.scss @@ -6,8 +6,10 @@ &__header { position: relative; + margin-top: 16px; margin-bottom: 40px; + text-align: center; @include text-header-2(); @@ -24,7 +26,7 @@ } &__editor-view { - margin: 20px 0; min-height: 100px; + margin: 20px 0; } } diff --git a/package-lock.json b/package-lock.json index a4794dde..3b16e66b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1505,6 +1505,19 @@ "markdownlint-rule-helpers": "0.17.2", "postcss": "8.4.16", "slugify": "1.6.5" + }, + "dependencies": { + "postcss": { + "version": "8.4.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", + "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + } } }, "@eslint/eslintrc": { @@ -1562,12 +1575,100 @@ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "@gravity-ui/eslint-config": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@gravity-ui/eslint-config/-/eslint-config-1.0.2.tgz", + "integrity": "sha512-988w7swpqZ8bwhPTNSVNvwJK3hJ4EBKA4dY7Sd0sTgXtjKLZhpff/I7Rncr76c8pgcXsvmHD2++kPnXe5oqx2Q==", + "dev": true, + "requires": { + "@babel/core": "7.16.0", + "@babel/eslint-parser": "7.16.3", + "@babel/preset-react": "7.16.0", + "@typescript-eslint/eslint-plugin": "5.3.1", + "@typescript-eslint/parser": "5.3.1", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", + "eslint-plugin-react": "7.27.0", + "eslint-plugin-react-hooks": "4.3.0", + "eslint-plugin-security": "1.4.0" + }, + "dependencies": { + "@babel/core": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", + "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.0", + "@babel/helper-compilation-targets": "^7.16.0", + "@babel/helper-module-transforms": "^7.16.0", + "@babel/helpers": "^7.16.0", + "@babel/parser": "^7.16.0", + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.0", + "@babel/types": "^7.16.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/preset-react": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.0.tgz", + "integrity": "sha512-d31IFW2bLRB28uL1WoElyro8RH5l6531XfxMtCeCmp6RVAF1uTfxxUA0LH1tXl+psZdwfmIbwoG4U5VwgbhtLw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-react-display-name": "^7.16.0", + "@babel/plugin-transform-react-jsx": "^7.16.0", + "@babel/plugin-transform-react-jsx-development": "^7.16.0", + "@babel/plugin-transform-react-pure-annotations": "^7.16.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + } + } + }, "@gravity-ui/i18n": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gravity-ui/i18n/-/i18n-1.0.0.tgz", "integrity": "sha512-KNYNhQjA9XqLo0RVEwNRqdA7/Lx5LLrNDtqWCvOGzXTwKU0GFNlWJaoSvk7u97apag23nTxgmpk551FlRCfehA==", "dev": true }, + "@gravity-ui/prettier-config": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/prettier-config/-/prettier-config-1.0.1.tgz", + "integrity": "sha512-VpTM+OiUMgXjwc7HBo0ekxBFghzELsnE/RFBYwbkbIqm0NrL4SiEPzne1IyEY/WsfI8om1hpn81t+qjGbicMSw==", + "dev": true + }, + "@gravity-ui/stylelint-config": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gravity-ui/stylelint-config/-/stylelint-config-1.0.1.tgz", + "integrity": "sha512-vm2ST9/5BmSsw3IcuU6inQZ38wbY19dk4ePkPo1UUzcFB39AKW+7JBnHlnWuwzrv0VwYCk8wahDFm7zkwHDurw==", + "dev": true, + "requires": { + "postcss-scss": "4.0.2", + "stylelint-config-prettier": "9.0.3", + "stylelint-order": "5.0.0", + "stylelint-prettier": "2.0.0", + "stylelint-scss": "4.0.0" + } + }, "@gravity-ui/tsconfig": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gravity-ui/tsconfig/-/tsconfig-1.0.0.tgz", @@ -1604,9 +1705,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -5083,94 +5184,6 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, - "@yandex-cloud/eslint-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/eslint-config/-/eslint-config-1.1.0.tgz", - "integrity": "sha512-E23OVGdZYXGCRPix6b5kQICbrxxtd+Jf8Xz3Y2KzGomsS9vS2uEklrmywCorEuskk0Vri43HeNBMlKNwXnwHwg==", - "dev": true, - "requires": { - "@babel/core": "7.16.0", - "@babel/eslint-parser": "7.16.3", - "@babel/preset-react": "7.16.0", - "@typescript-eslint/eslint-plugin": "5.3.1", - "@typescript-eslint/parser": "5.3.1", - "eslint-config-prettier": "8.3.0", - "eslint-plugin-prettier": "4.0.0", - "eslint-plugin-react": "7.27.0", - "eslint-plugin-react-hooks": "4.3.0", - "eslint-plugin-security": "1.4.0" - }, - "dependencies": { - "@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - } - }, - "@babel/preset-react": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.0.tgz", - "integrity": "sha512-d31IFW2bLRB28uL1WoElyro8RH5l6531XfxMtCeCmp6RVAF1uTfxxUA0LH1tXl+psZdwfmIbwoG4U5VwgbhtLw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-react-jsx-development": "^7.16.0", - "@babel/plugin-transform-react-pure-annotations": "^7.16.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } - } - }, - "@yandex-cloud/prettier-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/prettier-config/-/prettier-config-1.0.0.tgz", - "integrity": "sha512-LOZ5aXJOAC2BUM7KjcCu4itjoPcDhQ4au+iQast7lylEO+QWMbDpXWOM8Hx74sPkOqW5STUeABp+Q7x3UoYKaA==", - "dev": true - }, - "@yandex-cloud/stylelint-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@yandex-cloud/stylelint-config/-/stylelint-config-1.2.0.tgz", - "integrity": "sha512-y3tPXCMdNxqgdj8TnDoulOKpIIOIRyGscm7jaw5LZuRF6lMY2HINm74YfQkQggVNYZ4GqH3vyTbQc3Ng5+AypQ==", - "dev": true, - "requires": { - "postcss-scss": "4.0.2", - "stylelint-config-prettier": "9.0.3", - "stylelint-order": "5.0.0", - "stylelint-prettier": "2.0.0", - "stylelint-scss": "4.0.0" - } - }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -8716,13 +8729,13 @@ } }, "eslint": { - "version": "8.23.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz", - "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==", + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", + "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/config-array": "^0.10.5", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", @@ -13969,9 +13982,9 @@ "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" }, "js-sdsl": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", - "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "js-string-escape": { @@ -16511,9 +16524,9 @@ "dev": true }, "postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.17.tgz", + "integrity": "sha512-UNxNOLQydcOFi41yHNMcKRZ39NeXlr8AxGuZJsdub8vIb12fHzcq37DTU/QtbI6WLxNg2gF9Z+8qtRwTj1UI1Q==", "requires": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", @@ -19164,9 +19177,9 @@ } }, "stylelint": { - "version": "14.11.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.11.0.tgz", - "integrity": "sha512-OTLjLPxpvGtojEfpESWM8Ir64Z01E89xsisaBMUP/ngOx1+4VG2DPRcUyCCiin9Rd3kPXPsh/uwHd9eqnvhsYA==", + "version": "14.13.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.13.0.tgz", + "integrity": "sha512-NJSAdloiAB/jgVJKxMR90mWlctvmeBFGFVUvyKngi9+j/qPSJ5ZB+u8jOmGbLTnS7OHrII9NFGehPRyar8U5vg==", "dev": true, "requires": { "@csstools/selector-specificity": "^2.0.2", @@ -19175,7 +19188,7 @@ "cosmiconfig": "^7.0.1", "css-functions-list": "^3.1.0", "debug": "^4.3.4", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "fastest-levenshtein": "^1.0.16", "file-entry-cache": "^6.0.1", "global-modules": "^2.0.0", @@ -19202,7 +19215,7 @@ "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "style-search": "^0.1.0", - "supports-hyperlinks": "^2.2.0", + "supports-hyperlinks": "^2.3.0", "svg-tags": "^1.0.0", "table": "^6.8.0", "v8-compile-cache": "^2.3.0", diff --git a/package.json b/package.json index 009a64db..b1c8f161 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,9 @@ }, "devDependencies": { "@doc-tools/transform": "2.11.0", + "@gravity-ui/eslint-config": "1.0.2", + "@gravity-ui/prettier-config": "1.0.1", + "@gravity-ui/stylelint-config": "1.0.1", "@gravity-ui/tsconfig": "1.0.0", "@gravity-ui/uikit": "3.0.2", "@storybook/addon-essentials": "6.5.10", @@ -77,10 +80,7 @@ "@types/react-dom": "17.0.17", "@types/rimraf": "3.0.2", "@types/sanitize-html": "^2.6.2", - "@yandex-cloud/eslint-config": "^1.0.0", - "@yandex-cloud/prettier-config": "^1.0.0", - "@yandex-cloud/stylelint-config": "^1.0.0", - "eslint": "^8.3.0", + "eslint": "8.24.0", "gulp": "4.0.2", "gulp-cli": "2.3.0", "gulp-concat": "2.6.1", @@ -92,14 +92,15 @@ "jest-css-modules": "^2.1.0", "markdown-it-testgen": "^0.1.6", "npm-run-all": "^4.1.5", - "prettier": "^2.4.1", + "postcss": "8.4.17", + "prettier": "2.7.1", "prosemirror-test-builder": "1.1.0", "react": "17.0.2", "react-dom": "17.0.2", "rimraf": "3.0.2", "sass": "^1.43.4", "sass-loader": "10.2.1", - "stylelint": "^14.1.0", + "stylelint": "14.13.0", "svg-sprite-loader": "6.0.11", "ts-jest": "^27.0.7", "typescript": "^4.5.2" diff --git a/src/.eslintrc b/src/.eslintrc index b485e1d7..544ed36b 100644 --- a/src/.eslintrc +++ b/src/.eslintrc @@ -1,5 +1,5 @@ { - "extends": "@yandex-cloud/eslint-config/client", + "extends": "@gravity-ui/eslint-config/client", "overrides": [{ "files": ["*"], "rules": { diff --git a/src/extensions/behavior/Cursor/gapcursor.scss b/src/extensions/behavior/Cursor/gapcursor.scss index 4cfd1218..8fe7ad17 100644 --- a/src/extensions/behavior/Cursor/gapcursor.scss +++ b/src/extensions/behavior/Cursor/gapcursor.scss @@ -27,13 +27,17 @@ } &::before { - caret-color: transparent; + position: relative; + z-index: 1; + display: inline-block; - content: ' '; + margin-right: -1px; + + content: ' '; + caret-color: transparent; + border-right: 1px solid transparent; - position: relative; - z-index: 1; } .ProseMirror-focused &::before { diff --git a/src/extensions/behavior/Placeholder/index.scss b/src/extensions/behavior/Placeholder/index.scss index 664afe4a..4c8012ba 100644 --- a/src/extensions/behavior/Placeholder/index.scss +++ b/src/extensions/behavior/Placeholder/index.scss @@ -1,7 +1,9 @@ .ProseMirror .ye-placeholder { - color: var(--yc-color-text-secondary); display: inline-block; + pointer-events: none; + + color: var(--yc-color-text-secondary); } .ProseMirror.yfm-editor-hidecursor { @@ -27,13 +29,17 @@ caret-color: transparent; &::before { - caret-color: transparent; + position: relative; + z-index: 1; + display: inline-block; - content: ' '; + margin-right: -1px; + + content: ' '; + caret-color: transparent; + border-right: 1px solid transparent; - position: relative; - z-index: 1; } .ProseMirror-focused &_focus::before { diff --git a/src/extensions/markdown/Code/code.scss b/src/extensions/markdown/Code/code.scss index b2bb89ac..96c47eaa 100644 --- a/src/extensions/markdown/Code/code.scss +++ b/src/extensions/markdown/Code/code.scss @@ -18,11 +18,14 @@ } .ProseMirror-focused .fake-cursor { + position: relative; + z-index: 1; + margin-right: -1px; + border-left-width: 1px; border-left-style: solid; + animation: code_fake_blink 1s; animation-iteration-count: infinite; - position: relative; - z-index: 1; } diff --git a/src/extensions/yfm/Checkbox/index.scss b/src/extensions/yfm/Checkbox/index.scss index 6aed205d..fee1a88e 100644 --- a/src/extensions/yfm/Checkbox/index.scss +++ b/src/extensions/yfm/Checkbox/index.scss @@ -1,9 +1,9 @@ .ye-checkbox { - margin-bottom: 15px; display: flex; - align-items: center; + margin-bottom: 15px; + &__label { display: inline-block; } diff --git a/src/extensions/yfm/Math/view-and-edit.scss b/src/extensions/yfm/Math/view-and-edit.scss index 29aeccc9..d6d59e21 100644 --- a/src/extensions/yfm/Math/view-and-edit.scss +++ b/src/extensions/yfm/Math/view-and-edit.scss @@ -1,7 +1,8 @@ .math-inline, .math-block { - color: var(--yc-color-text-complementary); font-family: var(--yc-font-family-monospace); + + color: var(--yc-color-text-complementary); } .math-block-container { @@ -21,6 +22,7 @@ &::before, &::after { content: '$'; + color: var(--yc-color-text-hint); } } @@ -29,8 +31,10 @@ background-color: var(--yc-color-base-misc); &::before, &::after { - content: '$$'; display: block; + + content: '$$'; + color: var(--yc-color-text-hint); } } @@ -42,9 +46,10 @@ .math-block { position: absolute; top: 0; - left: 0; right: 0; bottom: 0; + left: 0; + opacity: 0; } } diff --git a/src/toolbar/FlexToolbar.scss b/src/toolbar/FlexToolbar.scss index c235c8a8..42e84fd8 100644 --- a/src/toolbar/FlexToolbar.scss +++ b/src/toolbar/FlexToolbar.scss @@ -1,5 +1,6 @@ .ye-flex-toolbar { position: relative; + height: 28px; &__container { diff --git a/src/toolbar/Toolbar.scss b/src/toolbar/Toolbar.scss index bde545b0..0850e353 100644 --- a/src/toolbar/Toolbar.scss +++ b/src/toolbar/Toolbar.scss @@ -3,6 +3,7 @@ &__group-separator { margin: 6px 8px; + border-left: 1px solid var(--yc-color-line-generic); } } diff --git a/src/toolbar/ToolbarButton.scss b/src/toolbar/ToolbarButton.scss index 208f45fa..248789b2 100644 --- a/src/toolbar/ToolbarButton.scss +++ b/src/toolbar/ToolbarButton.scss @@ -3,8 +3,8 @@ margin-left: 12px; padding: 0 8px; - border-radius: 4px; color: var(--yc-color-text-light-complementary); + border-radius: 4px; background-color: var(--yc-color-base-generic-medium-hover); } }