catppuccin / discord

🎮 Soothing pastel theme for Discord
MIT License
741 stars 173 forks source link

Theme code readability concerns. #310

Closed WinnerWind closed 2 months ago

WinnerWind commented 2 months ago

The code which is imported in the theme is unreadable and hence modifying it is quite difficult. Moreover, as the themes here are light-mode/dark-mode only themes, trying to make a "hybrid" theme (Eg. Latte in light mode but Mocha in dark mode) is impossible due to the aforementioned restriction. Would it be possible to clean up the code so that is is more readable and hence more editable?

ToxicAven commented 2 months ago

Are you referring to the minified code that is provided for importing?

WinnerWind commented 2 months ago

Yes, I am! Personally it would be nice if it was more readable, as dumping it all into one line is horrible for readability and debugging.

I'm trying to make a version of this theme that can both use Latte and Mocha at the same time, so Latte in light mode, and Mocha in dark mode, however because of how unreadable the import code is, I can't figure out from where to where I should dump it into the .theme-light and .theme-dark classes.

ToxicAven commented 2 months ago

The minified code loads a fair bit faster than the unminified version. If you wish to have the unminified code, please clone the repo and use the yarn build task to get an unminified copy of the code for debugging.

WinnerWind commented 2 months ago

Thanks for the tip! I just gave it a try, and indeed, an unminified version of the theme was outputted in <root>/dist/dist This will come in handy for me. Thanks so much, and sorry for the trouble.

Note for those reading in the future : Run yarn install before yarn build or yarn run then typing in build