Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add processing for styles in plugin-base #3460

Open
berezinant opened this issue Jan 22, 2024 · 1 comment · May be fixed by #3470
Open

Add processing for styles in plugin-base #3460

berezinant opened this issue Jan 22, 2024 · 1 comment · May be fixed by #3470
Assignees
Labels
enhancement An issue for a feature or an overall improvement format: html An issue/PR related to Dokka's default HTML output format
Milestone

Comments

@berezinant
Copy link
Contributor

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

@berezinant berezinant self-assigned this Jan 22, 2024
@berezinant berezinant added this to the Dokka 2.0.0 milestone Jan 22, 2024
@berezinant berezinant added enhancement An issue for a feature or an overall improvement format: html An issue/PR related to Dokka's default HTML output format labels Jan 23, 2024
@IgnatBeresnev
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement format: html An issue/PR related to Dokka's default HTML output format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants