From d195ff8b5742b3c21230b7185c897f1d6f3e2c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Wed, 21 Dec 2022 21:06:25 +0000 Subject: [PATCH] Update reference for background style. --- docs/styles/background.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/styles/background.md b/docs/styles/background.md index a551953fc..09a94f609 100644 --- a/docs/styles/background.md +++ b/docs/styles/background.md @@ -4,13 +4,18 @@ The `background` rule sets the background color of a widget. ## Syntax -``` -background: []; -``` +--8<-- "docs/snippets/syntax_block_start.md" +background: <color> [<percentage>]; +--8<-- "docs/snippets/syntax_block_end.md" + +The style `background` needs a [``](../css_types/color.md) followed by an optional [``](../css_types/percentage.md) to specify the color transparency. + +### Values --8<-- "docs/snippets/type_syntax/color.md" -The optional [percentage](./css_units/percentage.md) sets the transparency level and will override any transparency specified directly in the color. +--8<-- "docs/snippets/type_syntax/percentage.md" +This is clamped between `0%` and `100%`. ## Examples