dokka
dokka copied to clipboard
Add processing for styles in plugin-base
According to the spike for decomposing styles.css we need to add some processing of styles from plugin-base.
Now:
- plain css styles from
dokka-subprojects/plugin-base/src/main/resources/dokka/styles
are just copied to the resources to html pages
Should become:
styles from dokka-subprojects/plugin-base/src/main/resources/dokka/styles
- are written in scss since it provides flexible components organisation and imports
- are concatenated into one output css file
The source scss
files could be processed via tools like webpack
The source scss
files should be processed and compiled before/together with preparedokkaHtmlFrontendFiles
task
Grooming notes:
We'll have two types of styles: those we expect our users to be overriding, and those we don't.
The styles that we expect our users to be overriding - must be stored in plain .css
in plugin-base
, no minification / linting or any other additional processing, at least not in this first iterations. High-level reasons: it's more user-friendly and less error-prone. At the moment there's only one such file: logo-styles.css
.
Note: same principle can be applied to .js
files we have in plugin-base
. They can be broken down into two types and moved into plugin-base-frontend
.
The styles that we don't expect our users to be overriding - can be moved to plugin-base-frontend
, can be in .scss
format, can consist of multiple source files that will be compiled into a single large styles.css
before publishing Dokka. The users can override this resulting styles.css
, but we give no hard guarantees about its stability, and thus we don't go out of our way to make it convenient.
Anton will try to make all of the mentioned build changes himself in #3470, but we have an option to ask @adam-enko for help (and it might be worth it to add him to the reviewers of the PR).