From 8d0674c608c5b4edda9e9afe671757a6865c4389 Mon Sep 17 00:00:00 2001 From: Nigel Breslaw Date: Tue, 21 Jan 2025 10:45:49 +0200 Subject: [PATCH] Fix incorrect visible: false docs --- docs/astro/src/content/docs/reference/common.mdx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/astro/src/content/docs/reference/common.mdx b/docs/astro/src/content/docs/reference/common.mdx index 0a7a55b58c9..79b54fc460a 100644 --- a/docs/astro/src/content/docs/reference/common.mdx +++ b/docs/astro/src/content/docs/reference/common.mdx @@ -49,16 +49,13 @@ the element and its children with transparency. The opacity is applied to the tree of child elements as if they were first drawn into an intermediate layer, and then the whole layer is rendered with this opacity. -:::tip[Tip] -When an element has 0 opacity it will still take up layout space and any gesture handling will continue -to work. If the intent is to hide an element so it has no gesture handling or no longer takes up layout space, -use the `visible` property instead. -::: + ### visible -When set to `false`, the element and all his children won't be drawn and not react to mouse input. +When set to `false`, the element and all his children won't be drawn and not react to mouse input. The element +will still take up layout space within any layout container. The following example demonstrates the `opacity` property with children. An opacity is applied to the red rectangle. Since the green rectangle is a child of the red one, you can see the gradient underneath it, but you can't see the red rectangle through the green one.