Skip to content

If a style class includes both old-style and new-style colors, prefer the new-style ones #50

Description

@dstelzer

Dialog style classes can set their colors in two ways: using color and background-color (for Z-machine), and using --theme-dark and so on (for web). Right now, if a style class has both, the color and background-color win out, even on web. It would be better if the opposite were true, since --theme-dark etc are ignored on Z-machine. That way people can specify different colors for Z-machine and web in the same style class.

My first thought for how to solve this: when the web interpreter builds its stylesheets, if it sees a --theme-dark or similar property, it adds a second CSS block after the first that sets the color and background-color to read the variables, with !important to override the normal declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwebThe JavaScript interpreter, mainly used for the web frontend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions