-
I have a component that I want to have a dimmed prefix before normal text. My current approach seems awfully complex:
self.value = Text(
"0x", style=self.get_component_rich_style("mywidget--prefix")
).append(
f"{hex_value:X}",
style=self.get_component_rich_style("mywidget--normal"),
) Is there an easier way around this? In an idea world I'd like to just write: self.value = Text(
"0x", style=rich_style_from_css("color: $text-disabled")
).append(
f"{hex_value:X}",
style=rich_style_from_css("color: $text")
) |
Beta Was this translation helpful? Give feedback.
Answered by
davep
Feb 19, 2024
Replies: 1 comment 3 replies
-
Normally when I want to do this I just use the |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
mon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Normally when I want to do this I just use the
[dim]
Rich markup. For example this code is what's involved in making this: