diff --git a/.stylelintrc b/.stylelintrc index 7f07c96..b4b7a6c 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,21 +1,4 @@ { "ignoreDisables": true, - "extends": [ - "stylelint-config-standard-scss", - "stylelint-config-hudochenkov/order" - ], - "plugins": ["stylelint-scss"], - "rules": { - "alpha-value-notation": "number", - "at-rule-empty-line-before": null, - "block-no-empty": true, - "color-named": "never", - "color-hex-case": "lower", - "import-notation": null, - "max-nesting-depth": 5, - "no-invalid-position-at-import-rule": null, - "number-leading-zero": "never", - "property-no-vendor-prefix": true, - "rule-empty-line-before": null - } + "extends": "@kuohuanhuan/stylelint-config" } diff --git a/package-lock.json b/package-lock.json index 9f9d7bb..d56eb29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,13 +6,14 @@ "packages": { "": { "name": "x-markdown-css", - "version": "0.0.1-patch.3", + "version": "0.0.5", "license": "MIT", "dependencies": { "coffeescript": "^2.7.0", "sass": "^1.58.3" }, "devDependencies": { + "@kuohuanhuan/stylelint-config": "^0.0.3", "@lodder/grunt-postcss": "^3.1.1", "autoprefixer": "^10.4.13", "bumpp": "^9.0.0", @@ -22,10 +23,7 @@ "load-grunt-tasks": "^5.1.0", "postcss": "^8.4.21", "postcss-preset-env": "^8.0.1", - "stylelint": "^15.2.0", - "stylelint-config-hudochenkov": "^9.0.0", - "stylelint-config-standard-scss": "^7.0.1", - "stylelint-scss": "^4.4.0" + "stylelint": "^15.2.0" }, "engines": { "node": ">=16" @@ -621,6 +619,20 @@ "node": ">=10" } }, + "node_modules/@kuohuanhuan/stylelint-config": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@kuohuanhuan/stylelint-config/-/stylelint-config-0.0.3.tgz", + "integrity": "sha512-Z8TayDNZ/LolcOSYbEdrch0hSmIVrS/wBVAsuwZAfsIkqaCKRhoBydv+pN9CQeFxkYqyVjvNhYiEKORu/ZsrTA==", + "dev": true, + "peerDependencies": { + "bumpp": "^9.0.0", + "postcss-scss": "^4.0.6", + "prettier": "2.8.4", + "stylelint": "^15.2.0", + "stylelint-order": "^6.0.2", + "stylelint-scss": "^4.4.0" + } + }, "node_modules/@lodder/grunt-postcss": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@lodder/grunt-postcss/-/grunt-postcss-3.1.1.tgz", @@ -4127,6 +4139,7 @@ "url": "https://tidelift.com/funding/github/npm/postcss-scss" } ], + "peer": true, "engines": { "node": ">=12.0" }, @@ -4213,6 +4226,22 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -4830,76 +4859,6 @@ "url": "https://opencollective.com/stylelint" } }, - "node_modules/stylelint-config-hudochenkov": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-hudochenkov/-/stylelint-config-hudochenkov-9.0.0.tgz", - "integrity": "sha512-IOiSA2URkeIxEbn/Vl7OnkovjFci2o5n4qdC8gMuVkygeqCt7y3JJvagbRGgBoIvr3ldus/WBIEHRr+y8ZLXMw==", - "dev": true, - "peerDependencies": { - "stylelint": "^15.0.0", - "stylelint-order": "^6.0.2" - } - }, - "node_modules/stylelint-config-recommended": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-10.0.1.tgz", - "integrity": "sha512-TQ4xQ48tW4QSlODcti7pgSRqBZcUaBzuh0jPpfiMhwJKBPkqzTIAU+IrSWL/7BgXlOM90DjB7YaNgFpx8QWhuA==", - "dev": true, - "peerDependencies": { - "stylelint": "^15.0.0" - } - }, - "node_modules/stylelint-config-recommended-scss": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-9.0.1.tgz", - "integrity": "sha512-qAmz/TdrqslwiMTuLM3QXeISUkfEDUXGMfRBCHm/xrkCJNnQefv+mzG2mWTsWkqcVk8HAyUkug10dwAcYp2fCQ==", - "dev": true, - "dependencies": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^10.0.1", - "stylelint-scss": "^4.4.0" - }, - "peerDependencies": { - "postcss": "^8.3.3", - "stylelint": "^15.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - } - } - }, - "node_modules/stylelint-config-standard": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-30.0.1.tgz", - "integrity": "sha512-NbeHOmpRQhjZh5XB1B/S4MLRWvz4xxAxeDBjzl0tY2xEcayNhLbaRGF0ZQzq+DQZLCcPpOHeS2Ru1ydbkhkmLg==", - "dev": true, - "dependencies": { - "stylelint-config-recommended": "^10.0.1" - }, - "peerDependencies": { - "stylelint": "^15.0.0" - } - }, - "node_modules/stylelint-config-standard-scss": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-7.0.1.tgz", - "integrity": "sha512-m5sRdtsB1F5fnC1Ozla7ryftU47wVpO+HWd+JQTqeoG0g/oPh5EfbWfcVHbNCEtuoHfALIySiUWS20pz2hX6jA==", - "dev": true, - "dependencies": { - "stylelint-config-recommended-scss": "^9.0.0", - "stylelint-config-standard": "^30.0.1" - }, - "peerDependencies": { - "postcss": "^8.3.3", - "stylelint": "^15.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - } - } - }, "node_modules/stylelint-order": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-6.0.2.tgz", @@ -4919,6 +4878,7 @@ "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.4.0.tgz", "integrity": "sha512-Qy66a+/30aylFhPmUArHhVsHOun1qrO93LGT15uzLuLjWS7hKDfpFm34mYo1ndR4MCo8W4bEZM1+AlJRJORaaw==", "dev": true, + "peer": true, "dependencies": { "lodash": "^4.17.21", "postcss-media-query-parser": "^0.2.3", diff --git a/package.json b/package.json index 6c6c157..30c3b0a 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "sass": "^1.58.3" }, "devDependencies": { + "@kuohuanhuan/stylelint-config": "^0.0.3", "@lodder/grunt-postcss": "^3.1.1", "autoprefixer": "^10.4.13", "bumpp": "^9.0.0", @@ -56,9 +57,6 @@ "load-grunt-tasks": "^5.1.0", "postcss": "^8.4.21", "postcss-preset-env": "^8.0.1", - "stylelint": "^15.2.0", - "stylelint-config-hudochenkov": "^9.0.0", - "stylelint-config-standard-scss": "^7.0.1", - "stylelint-scss": "^4.4.0" + "stylelint": "^15.2.0" } } diff --git a/src/_content.scss b/src/_content.scss index b46bb43..9dd6076 100644 --- a/src/_content.scss +++ b/src/_content.scss @@ -1,5 +1,4 @@ @use 'sass:meta'; - @use 'partials/container'; .markdown-body { diff --git a/src/_vars.scss b/src/_vars.scss index b1e20f5..724bf9c 100644 --- a/src/_vars.scss +++ b/src/_vars.scss @@ -1,8 +1,6 @@ @use 'sass:meta'; - @use 'variables/constants'; @use 'variables/colors'; - @use 'variables/modes/light'; @use 'variables/modes/dark'; @@ -10,6 +8,7 @@ @each $name, $val in meta.module-variables('constants') { --xm-#{$name}: #{$val}; } + @each $name, $val in meta.module-variables('colors') { --xm-c-#{$name}: #{$val}; } @@ -20,6 +19,7 @@ --xm-c-#{$name}: #{$val}; } } + .dark .markdown-body { @each $name, $val in meta.module-variables('dark') { --xm-c-#{$name}: #{$val}; diff --git a/src/partials/code.scss b/src/partials/code.scss index d78380f..b36f4ac 100644 --- a/src/partials/code.scss +++ b/src/partials/code.scss @@ -8,6 +8,7 @@ code { content: '`'; } } + pre { overflow-x: auto; margin-top: 1.75rem; @@ -33,6 +34,7 @@ pre { } } } + .shiki { margin: .5rem 0; font-size: 1.05rem; diff --git a/src/partials/list.scss b/src/partials/list.scss index ef73478..d625365 100644 --- a/src/partials/list.scss +++ b/src/partials/list.scss @@ -2,6 +2,7 @@ li { margin-top: .5rem; margin-bottom: .5rem; } + ol { margin-top: 1.25rem; margin-bottom: 1.25rem; @@ -18,6 +19,7 @@ ol { } } } + ul { margin-top: 1.25rem; margin-bottom: 1.25rem; @@ -37,6 +39,7 @@ ul { } } } + ul ul, ul ol, ol ul, diff --git a/src/partials/table.scss b/src/partials/table.scss index 8f9dc8d..6b6c39d 100644 --- a/src/partials/table.scss +++ b/src/partials/table.scss @@ -7,6 +7,7 @@ table { line-height: 1.75; text-align: left; } + thead { border-bottom-width: 1px; border-bottom-color: var(--xm-c-thead-border); @@ -23,6 +24,7 @@ thead { } } } + tbody { tr { border-bottom-width: 1px; diff --git a/src/partials/text.scss b/src/partials/text.scss index 917486c..3e20893 100644 --- a/src/partials/text.scss +++ b/src/partials/text.scss @@ -2,13 +2,16 @@ p { margin-top: 1.25rem; margin-bottom: 1.25rem; } + strong { color: var(--xm-c-deep); font-weight: 600; } + b { color: var(--xm-c-deep); } + em { color: inherit; } diff --git a/src/partials/title.scss b/src/partials/title.scss index 9b594c1..3a5a04f 100644 --- a/src/partials/title.scss +++ b/src/partials/title.scss @@ -6,6 +6,7 @@ h1 { font-size: 2.25rem; line-height: 1.15; } + h2 { margin-top: 2rem; margin-bottom: 1rem; @@ -20,6 +21,7 @@ h2 { margin-top: 0; } } + h3 { margin-top: 1.6rem; margin-bottom: .6rem; @@ -35,6 +37,7 @@ h3 { margin-top: 0; } } + h4 { margin-top: 1.5rem; margin-bottom: .5rem; @@ -45,6 +48,7 @@ h4 { margin-top: 0; } } + h5, h6 { margin-top: 20px; @@ -54,6 +58,7 @@ h6 { text-transform: uppercase; opacity: .5; } + hr { width: 50px; margin-top: 2rem; @@ -63,6 +68,7 @@ hr { margin-top: 0; } } + .header-anchor { float: left; margin-top: .125rem; @@ -77,6 +83,7 @@ hr { text-decoration: none; } } + @for $i from 1 through 6 { h#{$i} { &:hover,