How to use import
for bootstrap in scss
#11729
Replies: 2 comments 2 replies
-
Quarto HTML Theming system will layer your custom theme with Bootstrap framework. See https://quarto.org/docs/output-formats/html-themes-more.html So any bootstrap content should be available without you needing to import it. However, I don't think our layering system allows to modify this part of Bootstrap.
and the API creates the utility class in the same file This quarto-cli/src/format/html/format-html-shared.ts Lines 103 to 106 in 5978971 So it seems there is no way to add between the utilities definitions and its usage for class creation However, you can add to it because you can define Your example needs some fixing though as ---
title: "test"
format:
html:
theme: custom.scss
---
# Content
The below uses the utility class
::: {.border-indigo style="border-style: dashed;"}
Border with custom color
:::
This does not use it
::: {style="border-style: dashed;"}
Border without custom color
::: Hope it helps understand. If you want to do more, it needs a feature request in Quarto to allow more specific bootstrap layering customization. Hope it helps |
Beta Was this translation helpful? Give feedback.
-
Thank you! It looks like the following snippet works: /*-- scss:uses --*/
$utilities: (
"border-indigo": (property: border-color,
class: border,
values: (indigo: rgb(0, 255, 0)))
); I substituted bright green since I get the error that indigo is not defined at that point. I put it in /*-- scss:defaults --*/
$utilities: (
"border-indigo": (property: border-color,
class: border,
values: (indigo: $indigo))
); For now this works since I don't want to modify the values in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi!
I would like to use bootstrap utilities to define some extra
scss
classes. However, I do not know where quarto stores thescss
files (I would assume that I can find something like the quarto scsss dist somewhere in my project but I am yet to find it.For instance, I would like to do something like
but I need to know where bootstrap exists so that I may import the necessary tools.
Beta Was this translation helpful? Give feedback.
All reactions