executablebooks / sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
https://sphinx-design.readthedocs.io/en/furo-theme/
MIT License
187 stars 57 forks source link

Changing colors on cards #157

Open zerothi opened 10 months ago

zerothi commented 10 months ago

Describe the bug

context I want to change colors on the full cards similar to the css annotations mentioned for button-link.

expectation I expected class-card to accept something similar to button-link

bug But instead nothing happens.

problem This is a problem for people doing because .

Reproduce the bug

I would like an entire card to follow the color schemes that one can choose for button-link.

However, there are no color attributes that associates with the button-link available colors (see here).

So I tried these things:

.. card:: Title
    :class-card: <here>

I tried with bg-primary, sd-color-primary etc. Now, bg-primary actually changes the color. However, I also have an extra css entry, with:

* {
  --bg-primary: #990000;
}

But it does not use it. Now, I have no idea about css, so probably I am doing things wrong there.

But, ideally, I would like to have a color + highlight color on the card. But I can't get it to work? Should it work?

List your environment

sphinx-design 0.5.0