mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Link to percentage unit.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Background
|
||||
|
||||
The `background` rule sets the background color of a widget with an optional transparency level.
|
||||
The `background` rule sets the background color of a widget.
|
||||
|
||||
## Syntax
|
||||
|
||||
@@ -10,6 +10,8 @@ background: <COLOR> [<PERCENTAGE>];
|
||||
|
||||
--8<-- "docs/styles/snippets/color_css_syntax.md"
|
||||
|
||||
The optional [percentage](./css_units/percentage.md) sets the transparency level and will override any transparency specified directly in the color.
|
||||
|
||||
## Examples
|
||||
|
||||
This example creates three widgets and applies a different background to each.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Color
|
||||
|
||||
The `color` rule sets the text color of a widget.
|
||||
The `color` rule sets the text color of a widget with an optional.
|
||||
|
||||
## Syntax
|
||||
|
||||
@@ -12,7 +12,7 @@ Use `auto` to automatically choose a color with suitable contrast for readabilit
|
||||
|
||||
--8<-- "docs/styles/snippets/color_css_syntax.md"
|
||||
|
||||
The optional percentage sets the transparency level.
|
||||
The optional [percentage](./css_units/percentage.md) sets the transparency level and will override any transparency specified directly in the color.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user