Skip to content
New issue

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

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

Already on GitHub? # to your account

Apply bootswatch theme to narrative col and sticky col #48

Closed
wants to merge 1 commit into from

Conversation

andrewpbray
Copy link
Contributor

One thorny thing that needs to be sorted out: right now the addition of bg-light by default screws with the nytimes demo. What's the best way to sort that out so that the nytimes styling takes precedent?

Perhaps by requiring that any secondary theme specify all of the style attributes specified by the bootswatch theme otherwise it's fine to use bootswatch?

@andrewpbray andrewpbray marked this pull request as draft July 25, 2024 07:08
@jimjam-slam
Copy link
Collaborator

jimjam-slam commented Jul 25, 2024

If you feel like you've gotten this to a good place as of our call, I'm happy to keep it as is, but I feel like we might benefit from guidance from the Quarto team on this one, since we're essentially guessing at some of the stuff about how SCSS files are merged in. Happy to file an issue/discussion if you think it's worth it!

What I do know is that SCSS files get interleaved: they have sections like /*-- scss:defaults --*/ (to set up variables) and /*-- scss:rules --*/, and those get individually combined across all SCSS files before the end result is collated (so all the defaults sections stay together, all the rules sections stay together, etc.)

I think ideally our rules would just touch layout in the CR sections, and we'd set a few CR-specific variables in the defaults that fall back to the existing theming. For example:

$cr-narrative-font: $font-family-sans-serif !default

Then people could set a base Quarto theme, and if they wanted to they could provide additional overrides or we could provide themes that essentially act as full Quarto themes (eg. nytimes.scss would essentially be a full Quarto theme)

What I don't know is:

  • The order SCSS files are merged in across extension, file and project
  • How the array vs string works (it seems like you have a better idea of this!)

@jimjam-slam jimjam-slam mentioned this pull request Jul 25, 2024
@jimjam-slam
Copy link
Collaborator

@andrewpbray Also interesting to note that you can provide format variants... seems like this might be a good way to provide some extra theming out of the box without having to copy those additional styles with a template!

@jimjam-slam
Copy link
Collaborator

I'll revert e1a5038 in main in just a sec — I wanted to test whether there was a Quarto bug with _metadata.yml. Dang it, GitHub Pages needs branch previews so we don't have to do this in main!

@andrewpbray
Copy link
Contributor Author

Thanks for putting together that discussion post on this. Seeing it all laid out is good validation that...yeah, its kinda complicated!

Good catch about format variants. I hadn't heard about that!

Amen about the branch preview thing. I could set up a netlify workflow for that... 🤔

@andrewpbray
Copy link
Contributor Author

Just for the sake of documentation, this conversation turns a bit on the outcome of convos with the devs: quarto-dev/quarto-cli#10383

@andrewpbray
Copy link
Contributor Author

@jimjam-slam you can now access the PR site at closeread.netlify.app (for all the good it does while these style sheets aren't merging!)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants