From 9ab240376fcc1ae65cad73ab7a1febbd893e1f01 Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Wed, 14 May 2025 13:18:01 +1200 Subject: [PATCH] Switch CLAY_CLIP_TO_NONE to default option for floating elements --- clay.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clay.h b/clay.h index 80aa60d..31634ad 100644 --- a/clay.h +++ b/clay.h @@ -445,12 +445,12 @@ typedef CLAY_PACKED_ENUM { CLAY_ATTACH_TO_ROOT, } Clay_FloatingAttachToElement; -// Controls how a floating element is clipped +// Controls whether or not a floating element is clipped to the same clipping rectangle as the element it's attached to. typedef CLAY_PACKED_ENUM { - // (default) The floating element is clipped by the context of its attached parent. - CLAY_CLIP_TO_ATTACHED_PARENT, - // The floating element is not clipped. + // (default) - The floating element does not inherit clipping. CLAY_CLIP_TO_NONE, + // The floating element is clipped to the same clipping rectangle as the element it's attached to. + CLAY_CLIP_TO_ATTACHED_PARENT } Clay_FloatingClipToElement; // Controls various settings related to "floating" elements, which are elements that "float" above other elements, potentially overlapping their boundaries, @@ -481,9 +481,9 @@ typedef struct { // CLAY_ATTACH_TO_ELEMENT_WITH_ID - Attaches this floating element to an element with a specific ID, specified with the .parentId field. positioned based on the .attachPoints and .offset fields. // CLAY_ATTACH_TO_ROOT - Attaches this floating element to the root of the layout, which combined with the .offset field provides functionality similar to "absolute positioning". Clay_FloatingAttachToElement attachTo; - // Controls how a floating element is clipped - // CLAY_CLIP_TO_ATTACHED_PARENT (default) - The floating element is clipped by the context of its attached parent. - // CLAY_CLIP_TO_NONE - The floating element is not clipped. + // Controls whether or not a floating element is clipped to the same clipping rectangle as the element it's attached to. + // CLAY_CLIP_TO_NONE (default) - The floating element does not inherit clipping. + // CLAY_CLIP_TO_ATTACHED_PARENT - The floating element is clipped to the same clipping rectangle as the element it's attached to. Clay_FloatingClipToElement clipTo; } Clay_FloatingElementConfig;