Skip to content

Data Attributes

Dorako edited this page Dec 6, 2023 · 1 revision

[data-theme]

This data-attribute marks an application as being themed by Dorako UI. As such, almost all styling uses it as part of its selector. It can be used to target specific themes, like [data-theme=bg3], but should generally be used to match a prefix like [data-theme^=bg3] for two reasons:

  1. It matches themes with variations, like bg3-brown and bg3-blue.
  2. It has a higher specificity, so it is required to overwrite Dorako UI styling which uses ^=.

[data-color-scheme]

Only two values are valid for this attribute, either light or dark. An application using [data-color-scheme=dark] will automatically include certain adaptations to better suit a dark background. The changes include adjustments to damage colors and degree-of-success colors.

[data-theme-color]

This data-attribute is controlled by the "Theme color" setting, and is currently added to PC and Vehicle sheets.

[data-rarity]

This data-attribute is added to any window-app where the underlying document has a rarity surfaced via the System. This includes NPC sheets and Item sheets. An example of its use can be seen in the bg3 theme where rarity affects the background of relevant sheets.

[data-has-footer]

This data-attribute is added to chat-messages that have footers. It can be used for advanced styling.

Clone this wiki locally