Skip to content

Commit

Permalink
Update custom themes documentation
Browse files Browse the repository at this point in the history
To reflect the changes in matrix-org/matrix-react-sdk#12240, including the removal of the username and color options (those are now themed through Compound)
  • Loading branch information
robintown committed Feb 13, 2024
1 parent 09dff6a commit ee72d0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To avoid name collisions, the internal name of a theme is
`custom-${theme.name}`. So if you want to set the custom theme below as the
default theme, you would use `default_theme: "custom-Electric Blue"`.

eg. in config.json:
e.g. in config.json:

```
"setting_defaults": {
Expand Down Expand Up @@ -63,8 +63,10 @@ eg. in config.json:
"timeline-text-color": "#2e2f32",
"timeline-text-secondary-color": "#61708b",
"timeline-highlights-color": "#f3f8fd",
"username-colors": ["#ff0000", ...]
"avatar-background-colors": ["#cc0000", ...]
},
"compound": {
"--cpd-color-icon-accent-tertiary": "var(--cpd-color-blue-800)",
"--cpd-color-text-action-accent": "var(--cpd-color-blue-900)"
}
}, {
"name": "Deep Purple",
Expand All @@ -89,8 +91,6 @@ eg. in config.json:
}
```

`username-colors` is expected to contain 6 colors. `avatar-background-colors` is expected to contain 3 colors. Both values are optional and have fallbacks from the built-in theme.

These are exposed as `--username-colors_0`, ... and `--avatar-background-colors_0`, ... respectively in CSS.
`compound` may contain overrides for any [semantic design token](https://compound.element.io/?path=/docs/tokens-semantic-colors--docs) belonging to our design system. The above example shows how you might change the accent color to blue by setting the relevant semantic tokens to refer to blue [base tokens](https://compound.element.io/?path=/docs/tokens-color-palettes--docs).

All properties in `fonts` are optional, and will default to the standard Riot fonts.

0 comments on commit ee72d0d

Please sign in to comment.