Skip to content

Commit

Permalink
Migrate to stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Nov 18, 2022
1 parent 9acfa7e commit 3763e0d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 56 deletions.
20 changes: 20 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"plugins": [
"stylelint-stylus"
],
"extends": [
"stylelint-stylus/standard"
],
"rules": {
"stylus/semicolon": "always",
"stylus/pythonic": "never",
"stylus/declaration-colon": "always",
"stylus/number-leading-zero": "never",
"stylus/selector-list-comma": "always",
"stylus/selector-list-comma-newline-after": "never-multi-line",
"stylus/media-feature-colon": "always",
"stylus/single-line-comment": false,
"stylus/single-line-comment-no-empty": false,
"stylus/block-closing-brace-newline-after": "never-single-line"
}
}
45 changes: 0 additions & 45 deletions .stylintrc

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"eslint": "eslint scripts/ source/js test/",
"prepare": "node .githooks/install.js",
"stylint": "stylint source/css/",
"stylint": "stylelint source/css/ --ip source/css/_common/scaffolding/highlight/index.styl",
"test": "mocha test/index.js",
"test-cov": "c8 npm test"
},
Expand All @@ -40,6 +40,7 @@
"hexo-renderer-marked": "6.0.0",
"js-yaml": "4.1.0",
"mocha": "10.1.0",
"stylint": "2.0.0"
"stylelint": "14.15.0",
"stylelint-stylus": "0.17.0"
}
}
18 changes: 9 additions & 9 deletions source/css/_common/components/third-party/disqusjs.styl
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
if (hexo-config('disqusjs.enable') and hexo-config('darkmode')) {
@media (prefers-color-scheme:dark) {
html #dsqjs a {
color: var(--link-color)
color: var(--link-color);
}

html #dsqjs a:focus,html #dsqjs a:hover {
color: var(--link-hover-color)
color: var(--link-hover-color);
}

html #dsqjs .dsqjs-nav,html #dsqjs footer {
border-color: var(--card-bg-color)
border-color: var(--card-bg-color);
}

html #dsqjs .dsqjs-load-more,html #dsqjs .dsqjs-load-more:hover,html #dsqjs .dsqjs-nav-tab,html #dsqjs .dsqjs-no-comment,html #dsqjs .dsqjs-post-content {
color: var(--text-color)
color: var(--text-color);
}

html #dsqjs .dsqjs-order-label {
background-color: #3e4b5e
background-color: #3e4b5e;
}

html #dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label {
background-color: var(--content-bg-color)
background-color: var(--content-bg-color);
}

html #dsqjs .dsqjs-tab-active>span:after {
background-color: #2e9fff!important
background-color: #2e9fff!important;
}

html #dsqjs .dsqjs-footer,html #dsqjs .dsqjs-meta {
color: var(--text-color)
color: var(--text-color);
}

html #dsqjs .dsqjs-post-body blockquote {
border-color: var(--content-bg-color)
border-color: var(--content-bg-color);
}
}
}

0 comments on commit 3763e0d

Please sign in to comment.