anthonynorth / rscodeio

An RStudio theme inspired by Visual Studio Code.
Other
409 stars 66 forks source link

Modularize editor theme creation #47

Open salim-b opened 4 years ago

salim-b commented 4 years ago

Since we now provide two different editor themes which still share most of their CSS rules, I think it would make a lot of sense to separate/modularize the CSS code (e.g. into multiple files). This would have the following benefits:

I'm everything else than skilled in "CSS land", so I don't know much about more sophisticated tools/technologies like PostCSS or SCSS/Sass. But I have a feeling that it might make a lot of sense to e.g. directly switch to a Sass pipeline.

Addendum: I just noticed there's the sass R package from RStudio that allows to compile Sass to CSS from within R. It also provides a short introduction into Sass.

Addendum 2: It might be beneficial to examine how the rsthemes package solves this. Its author was apparently crazy enough to expose all relevant CSS selectors in the rsthemes::rstheme() function assisting in the creation of new editor themes.

@anthonynorth What do you think about this?