gd047
March 31, 2022, 3:42pm
1
How can i find out which bootstrap scss variable is used by rmarkdown / bslib to color page elements? e.g. for coloring the TOC background?
Here is a page's yaml
output:
html_document:
self_contained: false
theme:
version: 4
bootswatch: cyborg
toc: yes
toc_depth: 3
toc_float:
collapsed: true
cderv
April 7, 2022, 9:58am
2
List of variables can be found in bslib website:
I don't know if there is one specifically for the TOC background. Not sure.
You may need to use CSS directly for this, or SCSS if you want to reuse a variable from bootstrap. See example of adding rules
gd047
April 7, 2022, 12:24pm
3
That SO answer describes the procedure for concluding that the variable is list-group-bg
. Do you know if there is another way?
cderv
April 7, 2022, 2:56pm
4
This is all Bootstrap after all so its doc could help:
Get started with Bootstrap, the world’s most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page.
Otherwise, this is a good way to look at the HTML and see how it used Bootstrap. I don't know any other way than the bslib website.
system
Closed
April 28, 2022, 2:57pm
5
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.