Move all remaining colors into CSS variables (#21903)
This should eliminate all non-variable color usage in the styles, making gitea fully themeable via CSS variables. Also, it adds a linter to enforce variables for colors.
This commit is contained in:
parent
68e934ab5d
commit
ee21d5453f
8 changed files with 199 additions and 43 deletions
120
package-lock.json
generated
120
package-lock.json
generated
|
@ -65,6 +65,7 @@
|
|||
"postcss-less": "6.0.0",
|
||||
"stylelint": "14.15.0",
|
||||
"stylelint-config-standard": "29.0.0",
|
||||
"stylelint-declaration-strict-value": "1.9.1",
|
||||
"svgo": "3.0.2",
|
||||
"updates": "13.2.1",
|
||||
"vitest": "0.25.2"
|
||||
|
@ -2260,6 +2261,15 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/css-color-names": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
|
||||
"integrity": "sha512-zj5D7X1U2h2zsXOAM8EyUREBnnts6H+Jm+d1M2DbiQQcUtnqgQsMrdo8JW9R80YFUmIdBZeMu5wvYM7hcgWP/Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/css-functions-list": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz",
|
||||
|
@ -2310,6 +2320,12 @@
|
|||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
},
|
||||
"node_modules/css-shorthand-properties": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz",
|
||||
"integrity": "sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/css-tree": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
|
||||
|
@ -2324,6 +2340,23 @@
|
|||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/css-values": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-values/-/css-values-0.1.0.tgz",
|
||||
"integrity": "sha512-hQ6JSn4t/70aOCvdlP9zTOsFFUifMSKWz3PX7rz5NZl+uEHCqTFVJJvfP07isErCGEVHYoc8Orja8wLKZRvOeg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"css-color-names": "0.0.4",
|
||||
"ends-with": "^0.2.0",
|
||||
"postcss-value-parser": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/css-values/node_modules/postcss-value-parser": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
|
||||
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/css-what": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
|
||||
|
@ -3497,6 +3530,15 @@
|
|||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/ends-with": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz",
|
||||
"integrity": "sha512-lRppY4dK3VkqBdR242sKcAJeYc8Gf/DhoX9AWvWI2RzccmLnqBQfwm2k4oSDv5MPDjUqawCauXhZkyWxkVhRsg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
|
||||
|
@ -7990,6 +8032,15 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shortcss": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/shortcss/-/shortcss-0.1.3.tgz",
|
||||
"integrity": "sha512-MIOoTd99CIGTrAuGiMUx9VZrnrZmWzEHuKbGM/w+ia/w98cezhlN9w4aQOVSxswdoqkUnWrMw3tThOi3sevZAg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"css-shorthand-properties": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
||||
|
@ -8399,6 +8450,19 @@
|
|||
"stylelint": "^14.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-declaration-strict-value": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-declaration-strict-value/-/stylelint-declaration-strict-value-1.9.1.tgz",
|
||||
"integrity": "sha512-iIkMh2ukIfSTtJoEDgGq5cqUyYWP8NExPk2YSGcePtFikb7KmJoSi0QYajiZRxge/PTbYspci7nIcrtArJlAsw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"css-values": "^0.1.0",
|
||||
"shortcss": "^0.1.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": ">=7 <=14"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint/node_modules/balanced-match": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
|
||||
|
@ -11448,6 +11512,12 @@
|
|||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"css-color-names": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
|
||||
"integrity": "sha512-zj5D7X1U2h2zsXOAM8EyUREBnnts6H+Jm+d1M2DbiQQcUtnqgQsMrdo8JW9R80YFUmIdBZeMu5wvYM7hcgWP/Q==",
|
||||
"dev": true
|
||||
},
|
||||
"css-functions-list": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz",
|
||||
|
@ -11482,6 +11552,12 @@
|
|||
"nth-check": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"css-shorthand-properties": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz",
|
||||
"integrity": "sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==",
|
||||
"dev": true
|
||||
},
|
||||
"css-tree": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
|
||||
|
@ -11492,6 +11568,25 @@
|
|||
"source-map-js": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"css-values": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-values/-/css-values-0.1.0.tgz",
|
||||
"integrity": "sha512-hQ6JSn4t/70aOCvdlP9zTOsFFUifMSKWz3PX7rz5NZl+uEHCqTFVJJvfP07isErCGEVHYoc8Orja8wLKZRvOeg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"css-color-names": "0.0.4",
|
||||
"ends-with": "^0.2.0",
|
||||
"postcss-value-parser": "^3.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss-value-parser": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
|
||||
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"css-what": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
|
||||
|
@ -12421,6 +12516,12 @@
|
|||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
|
||||
},
|
||||
"ends-with": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz",
|
||||
"integrity": "sha512-lRppY4dK3VkqBdR242sKcAJeYc8Gf/DhoX9AWvWI2RzccmLnqBQfwm2k4oSDv5MPDjUqawCauXhZkyWxkVhRsg==",
|
||||
"dev": true
|
||||
},
|
||||
"enhanced-resolve": {
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
|
||||
|
@ -15622,6 +15723,15 @@
|
|||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
|
||||
},
|
||||
"shortcss": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/shortcss/-/shortcss-0.1.3.tgz",
|
||||
"integrity": "sha512-MIOoTd99CIGTrAuGiMUx9VZrnrZmWzEHuKbGM/w+ia/w98cezhlN9w4aQOVSxswdoqkUnWrMw3tThOi3sevZAg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"css-shorthand-properties": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"side-channel": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
||||
|
@ -15970,6 +16080,16 @@
|
|||
"stylelint-config-recommended": "^9.0.0"
|
||||
}
|
||||
},
|
||||
"stylelint-declaration-strict-value": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-declaration-strict-value/-/stylelint-declaration-strict-value-1.9.1.tgz",
|
||||
"integrity": "sha512-iIkMh2ukIfSTtJoEDgGq5cqUyYWP8NExPk2YSGcePtFikb7KmJoSi0QYajiZRxge/PTbYspci7nIcrtArJlAsw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"css-values": "^0.1.0",
|
||||
"shortcss": "^0.1.3"
|
||||
}
|
||||
},
|
||||
"stylis": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue