사용자 정의 테마 컴포넌트에서 Discourse 테마 색상 변수를 참조하는 방법?

I have trouble like this all the time. Sure, it’s “obvious” to use var, but only if you know and can remember!

i’m waiting for something to run, so out of curiosity I checked https://ask.discourse.com/ and asked “Is it possible to access Discourse theme color variables in my own theme component?” and lo! I got this:

  1. Available Color Variables:
    Discourse provides several predefined CSS custom properties for colors, such as:

    var(--primary)
    var(--secondary)
    var(--tertiary)
    var(--quaternary)
    var(--header_background)
    var(--header_primary)
    var(--highlight)
    var(--danger)
    var(--success)
    var(--love)
    
    
  2. Example Usage:
    You can use these variables in your CSS to ensure your theme adapts to different user-selected color schemes. For instance:

    body {
        background: var(--highlight);
    }