From 2fac2a8c5e25bce3358050a32f748ce9af2dcb04 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 8 Jul 2025 21:09:13 +0300 Subject: [PATCH] chore(next): improve performance of a specific selector --- apps/client/src/stylesheets/theme-next/shell.css | 6 +++--- .../src/widgets/ribbon_widgets/promoted_attributes.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css index 2dfdadfbc..d014e770b 100644 --- a/apps/client/src/stylesheets/theme-next/shell.css +++ b/apps/client/src/stylesheets/theme-next/shell.css @@ -1301,9 +1301,9 @@ div.promoted-attribute-cell .tn-checkbox { height: 1cap; } -/* The
containing the checkbox for a promoted boolean attribute */ -div.promoted-attribute-cell div:has(input[type="checkbox"]) { - order: -1; /* Relocate the checkbox before the label */ +/* Relocate the checkbox before the label */ +div.promoted-attribute-cell.promoted-attribute-label-boolean > div:first-of-type { + order: -1; margin-right: 1.5em; } diff --git a/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts b/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts index 33341dd3f..a9aef77db 100644 --- a/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts +++ b/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts @@ -188,6 +188,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { .append($multiplicityCell); if (valueAttr.type === "label") { + $wrapper.addClass(`promoted-attribute-label-${definition.labelType}`); if (definition.labelType === "text") { $input.prop("type", "text");