pradyunsg / sphinx-basic-ng

A modernised skeleton for Sphinx themes.
https://sphinx-basic-ng.readthedocs.io/en/latest/
MIT License
31 stars 11 forks source link

How do we want to share CSS/SCSS across themes? #3

Closed pradyunsg closed 2 years ago

pradyunsg commented 3 years ago

Ideally, we'd only have a single CSS file get included in the final theme-built-pages (assuming no CSS comes from extensions or the users).

I have no idea how we'd achieve this, or whether this is something that we agree would be a worthwhile investment of effort. :)

pradyunsg commented 3 years ago

@chrisjsewell @choldgraf Any bright ideas for this one?

choldgraf commented 3 years ago

mmm TBH I'm not sure how we'd accomplish this. What is the main downside between this vs. having sub-themes just have their own CSS files?

pradyunsg commented 3 years ago

Asset sharing mainly. With this it would be much easier to have like some subset of the other theme, especially if that other theme is using Sass and compiling down to CSS.

The example use case I’m designing for is... a different theme being able to use Furo’s sidebar styling or Furo’s content styling without duplication of that Sass, or needing to break up the CSS into multiple files in Furo.

pradyunsg commented 2 years ago

I'm gonna kick the can for this into sphinx-theme-builder. This needs some mechanism for a JS bundler <-> Python package installation path integration, and having that be somewhere around the build system makes more sense than a base theme that folks derive from.