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

New theme generation and filenaming with hashing should apply to dark mode style too #10819

Open
cderv opened this issue Sep 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working html Issues with HTML and related web technology (html/css/scss) themes Related to HTML theming or any other style related issue (like highlight-style)
Milestone

Comments

@cderv
Copy link
Collaborator

cderv commented Sep 17, 2024

This is a follow up on 1.6 fix

The current solution does not apply to dark theme which builds to bootstrap-dark.min.css. No hash is used.

quarto create project website test-dark

Add to about.qmd this config

format:
  html:
    fontcolor: red

and this in _qaurto.yml

format:
  html:
    theme: 
      light: flatly
      dark: darkly

Then do quarto render

Light theme

This now works well. The red font color will only apply to about.html, and not the entire website

Dark theme

Switch to dark theme now with toggle. This still doesn't work and the configuration applies to whole website, like initial issue for light theme

When looking at CSS files produced we see no hash is appended.

❯ ls .\_site\site_libs\bootstrap\

    Directory: C:\Users\chris\AppData\Local\Temp\quarto\test-subdir\_site\site_libs\bootstrap

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          17/09/2024    11:26         474885 bootstrap-cbee0a5f18ab906682e9d4fb633eabe1.min.css
-a---          17/09/2024    11:27         474541 bootstrap-dark.min.css
-a---          17/09/2024    11:27         474797 bootstrap-fcdf0d5c94eae0f74b37b7cfe1fba367.min.css
-a---          05/09/2024    15:43          98163 bootstrap-icons.css
-a---          17/09/2023    07:15         176200 bootstrap-icons.woff
-a---          05/09/2024    15:50          80668 bootstrap.min.js

We probably need to extend the initial fix to dark theming too, to have a boostrap-dark-<hash>.min.css.

@cscheid you may know how to do it quickly. Otherwise, I can take a shot at this based on #10611

@cderv cderv added html Issues with HTML and related web technology (html/css/scss) themes Related to HTML theming or any other style related issue (like highlight-style) labels Sep 17, 2024
@cderv cderv added this to the v1.6 milestone Sep 17, 2024
@mcanouil

This comment has been minimized.

@mcanouil mcanouil added the bug Something isn't working label Sep 17, 2024
@cderv

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working html Issues with HTML and related web technology (html/css/scss) themes Related to HTML theming or any other style related issue (like highlight-style)
Projects
None yet
Development

No branches or pull requests

3 participants