dwitter icon indicating copy to clipboard operation
dwitter copied to clipboard

Enable css compression for theme_dark.css

Open lionleaf opened this issue 7 years ago • 3 comments

theme_dark.css is currently loaded without compression and cache magic. (So people might still get stale versions for a while after a change)

lionleaf avatar Mar 31 '18 16:03 lionleaf

This was also fixed before... You might wanna close this.

dwitterer avatar Apr 18 '18 19:04 dwitterer

main.css is being compressed again, yes. But theme_dark.css is still not being compressed. This is because it's being loaded in js, and I didn't look into how to get the correct link for the compressed version.

lionleaf avatar Apr 22 '18 12:04 lionleaf

If I recall correctly, when switching theme, the browser:

  1. Uses Javascript to load the CSS directly into the current page, but then
  2. Reloads the page (where the CSS <link> tag gets injected by the back-end)

It seems to me that only one of these stages is actually needed, not both of them!

If you drop stage 1, that would prevent lionleaf's aforementioned problem.

(And whilst live theme loading might be somewhat desirable, I don't think it's essential. Switching theme is not something someone does all that often, is it?)

joeytwiddle avatar Jun 26 '18 03:06 joeytwiddle