Replace Less with CSS (#23481)
Ran most of the Less files through the Less compiler and Prettier and then followed up with a round of manual fixes. The Less compiler had unfortunately stripped all `//` style comments that I had to restore (It did preserve `/* */` comments). Other fixes include duplicate selector removal which were revealed after the transpilation and which weren't caught by stylelint before but now are. Fixes: https://github.com/go-gitea/gitea/issues/15565
This commit is contained in:
parent
bf730528ca
commit
202803fc69
73 changed files with 8215 additions and 7777 deletions
|
@ -21,7 +21,7 @@ const glob = (pattern) => fastGlob.sync(pattern, {
|
|||
});
|
||||
|
||||
const themes = {};
|
||||
for (const path of glob('web_src/less/themes/*.less')) {
|
||||
for (const path of glob('web_src/css/themes/*.css')) {
|
||||
themes[parse(path).name] = [path];
|
||||
}
|
||||
|
||||
|
@ -57,14 +57,14 @@ export default {
|
|||
fileURLToPath(new URL('web_src/js/index.js', import.meta.url)),
|
||||
fileURLToPath(new URL('node_modules/easymde/dist/easymde.min.css', import.meta.url)),
|
||||
fileURLToPath(new URL('web_src/fomantic/build/semantic.css', import.meta.url)),
|
||||
fileURLToPath(new URL('web_src/less/index.less', import.meta.url)),
|
||||
fileURLToPath(new URL('web_src/css/index.css', import.meta.url)),
|
||||
],
|
||||
webcomponents: [
|
||||
fileURLToPath(new URL('web_src/js/webcomponents/GiteaOriginUrl.js', import.meta.url)),
|
||||
],
|
||||
swagger: [
|
||||
fileURLToPath(new URL('web_src/js/standalone/swagger.js', import.meta.url)),
|
||||
fileURLToPath(new URL('web_src/less/standalone/swagger.less', import.meta.url)),
|
||||
fileURLToPath(new URL('web_src/css/standalone/swagger.css', import.meta.url)),
|
||||
],
|
||||
serviceworker: [
|
||||
fileURLToPath(new URL('web_src/js/serviceworker.js', import.meta.url)),
|
||||
|
@ -136,7 +136,7 @@ export default {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /.css$/i,
|
||||
test: /\.css$/i,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
|
@ -151,29 +151,6 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /.less$/i,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
url: {filter: filterCssImport},
|
||||
import: {filter: filterCssImport},
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'less-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
include: fileURLToPath(new URL('public/img/svg', import.meta.url)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue