-
Notifications
You must be signed in to change notification settings - Fork 153
bundle css; custom styles; named themes #414
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, still need to figure out how, but the idea is that this makes it easier for the user to supply their own |
I’ve added a style config option to this PR now. It defaults to our default stylesheet: @import url("observablehq:theme-auto.css");
@import url("observablehq:default.css"); But you can override it, say to force a light theme, or to define a custom one: @import url("observablehq:theme-light.css");
@import url("observablehq:default.css"); The built-in CSS modules are enumerated here: |
I was going to comment on the missing documentation :) I think this is a good user experience. It's especially enjoyable that relative |
Am I right to understand that with the current bundler, a new .css file will be bundled per .md file that have a custom In many cases, I need some pages to only load an additional snippet on top of the site’s global For instance, using In @import url("./article/header.css");
@import url("./article/section.css");
@import url("./article/typography.css"); The Another way of achieving this is providing a |
This adopts esbuild to bundle our CSS. This should eventually help with #60, but the idea for now is merely to separate the CSS into separate files so it’s a bit easier to manage.