From d0ef225ea33ed601d1ed90dd2a9fbfc2ef2332b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Thu, 28 Mar 2024 21:44:03 +0000 Subject: [PATCH] Make click on OpenAPI property name selects the entire text (#2249) --- src/components/DocumentView/OpenAPI/style.css | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/DocumentView/OpenAPI/style.css b/src/components/DocumentView/OpenAPI/style.css index 1f7bcde36..5f618fcea 100644 --- a/src/components/DocumentView/OpenAPI/style.css +++ b/src/components/DocumentView/OpenAPI/style.css @@ -106,8 +106,14 @@ @apply mt-3; } +.openapi-schema-name { + /* To make double click on the property name select only the name, + we disable selection on the parent and re-enable it on the children. */ + @apply select-none; +} + .openapi-schema-propertyname { - @apply font-medium text-base text-dark/10 dark:text-light/10; + @apply select-all font-medium text-base text-dark/10 dark:text-light/10; } .openapi-schema-required { @@ -115,7 +121,7 @@ } .openapi-schema-type { - @apply font-mono ml-3 text-base text-dark-4/8 dark:text-light-4; + @apply font-mono ml-3 text-base text-dark-4/8 dark:text-light-4 select-text; } .openapi-schema-type:only-child {