1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00
forgejo/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 Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
code Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
codemirror Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
console Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
features Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
markup Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
modules Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
shared Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
standalone Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
themes Fix theme-auto loading (#23504) 2023-03-15 17:15:12 -04:00
admin.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
animations.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
base.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
dashboard.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
editor.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
explore.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
font_i18n.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
form.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
helpers.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
home.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
index.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
install.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
organization.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
package.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
repository.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
review.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
runner.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
svg.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
tribute.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
user.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00