diff --git a/docs/snippets/type_syntax/border.md b/docs/snippets/type_syntax/border.md index ce8c6eaa2..519507bdd 100644 --- a/docs/snippets/type_syntax/border.md +++ b/docs/snippets/type_syntax/border.md @@ -1,4 +1,4 @@ -The [``](/css_types/border.md) type can take any of the following values: +The [``](/css_types/border) type can take any of the following values: | Border type | Description | |-------------|----------------------------------------------------------| diff --git a/docs/styles/layer.md b/docs/styles/layer.md index 39a7e0d14..27492311c 100644 --- a/docs/styles/layer.md +++ b/docs/styles/layer.md @@ -1,15 +1,25 @@ # Layer -The `layer` property is used to assign widgets to a layer. -Layers control the order in which widgets are painted on screen. -The value of the `layer` property must be the name of a layer defined using a [`layers`](../layers) declaration. -More information on layers can be found in the [guide](../guide/layout.md#layers). +The `layer` property defines the layer a widget belongs to. ## Syntax -``` -layer: ; -``` +--8<-- "docs/snippets/syntax_block_start.md" +layer: <name>; +--8<-- "docs/snippets/syntax_block_end.md" + +The `layer` rule accepts a [``](../css_types/name.md) that defines the layer this widget belongs to. +This [``](../css_types/name.md) must correspond to a [``](../css_types/name.md) that has been defined in a [`layers`](./layers.md) rule by an ancestor of this widget. + +More information on layers can be found in the [guide](../guide/layout.md#layers). + +### Values + +--8<-- "docs/snippets/type_syntax/name.md" + +!!! warning + + Using a `` that hasn't been defined in a [`layers`](./layers.md) declaration of an ancestor of this widget has no effect. ## Example diff --git a/docs/styles/layers.md b/docs/styles/layers.md index c619eb0d6..af7d0766a 100644 --- a/docs/styles/layers.md +++ b/docs/styles/layers.md @@ -1,19 +1,23 @@ # Layers The `layers` property allows you to define an ordered set of layers. -Layers control the order in which widgets are painted on screen. -These `layers` can later be referenced using the [`layer`](../layer) property. -More information on layers can be found in the [guide](../guide/layout.md#layers). ## Syntax -``` -layers: . . .; -``` +--8<-- "docs/snippets/syntax_block_start.md" +layers: <name>+; +--8<-- "docs/snippets/syntax_block_end.md" -Layers that come first in the list are drawn before the layers that come after. -This means the first layer will be under all other layers and the last layer will be above all other layers. -See the example below. +The `layers` rule accepts one or more [``](../css_types/name.md) that define the layers that the widget is aware of, and the order in which they will be painted on the screen. + +The values used here can later be referenced using the [`layer`](../layer) property. +The layers defined first in the list are drawn under the layers that are defined later in the list. + +More information on layers can be found in the [guide](../guide/layout.md#layers). + +### Values + +--8<-- "docs/snippets/type_syntax/name.md" ## Example