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 6, 2024
1 parent e85d6c5 commit 5919c33
Show file tree
Hide file tree
Showing 2 changed files with 498 additions and 221 deletions.
Loading

0 comments on commit 5919c33

Please sign in to comment.