How to find out which scss variable is used for coloring page elements

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

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

That SO answer describes the procedure for concluding that the variable is list-group-bg. Do you know if there is another way?

This is all Bootstrap after all so its doc could help:

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.

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.