Skip to content

Commit

Permalink
content [nfc]: Put code-block span styles in ContentTheme
Browse files Browse the repository at this point in the history
With the code-block span styles all bundled together in a new
CodeBlockTextStyles class, it'll be convenient to make separate
`light` and `dark` constructors toward zulip#95 dark theme.

Next, we'll pass a BuildContext to the CodeBlockTextStyles
constructor, in order to use weightVariableTextStyle for the spans
that are supposed to be bold. (The code-block font, Source Code Pro,
is variable-weight.) This would have been possible before the
current refactor, of course, but this way the spans don't have to
repeat the weightVariableTextStyle computations on-demand. They can
instead just look up the result from this central source.

Related: zulip#95
  • Loading branch information
chrisbobbe committed Jun 17, 2024
1 parent a5894f4 commit 95d6c58
Show file tree
Hide file tree
Showing 2 changed files with 492 additions and 216 deletions.
Loading

0 comments on commit 95d6c58

Please sign in to comment.