0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-09-12 04:09:41 +02:00
gitea/web_src/css
silverwind 19cbd5c3d9
Fix theme-auto loading (#23504)
Fix regression from https://github.com/go-gitea/gitea/pull/23481.

The conditional on the CSS import was being stripped away by webpack's
`css-loader`, resulting in the dark theme always loading. The old syntax
with `@import` nested inside `@media` also did not work as `css-loader`
(rightfully) ignores such non-standard `@import` syntax that was
previously supported by Less.

Unfortunately, we have to re-introduce postcss to the CSS pipeline to
fix this and I loaded only the minimal plugins to make it work.

There is one variant of the fix that does work without postcss, which is
to exclude the file from transpilation but I did not consider it as it
would have meant the `@import` was being done without a version suffix
in the URL, which would have caused cache issue.

Related: https://github.com/webpack-contrib/css-loader/issues/1503

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-03-15 17:15:12 -04:00
..
chroma
code
codemirror
console
features
markup
modules
shared
standalone
themes
admin.css
animations.css
base.css
dashboard.css
editor.css
explore.css
font_i18n.css
form.css
helpers.css
home.css
index.css
install.css
organization.css
package.css
repository.css
review.css
runner.css
svg.css
tribute.css
user.css