From aceb5a90e906ebf8076b594181f4d08c7a712fa2 Mon Sep 17 00:00:00 2001 From: lk316 <51822928+lk316@users.noreply.github.com> Date: Mon, 27 Jul 2026 20:52:31 +0300 Subject: [PATCH 1/2] Fix for non-required controls becoming required --- .../public/assets/style/pos-forms.css | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pos-module-common-styling/modules/common-styling/public/assets/style/pos-forms.css b/pos-module-common-styling/modules/common-styling/public/assets/style/pos-forms.css index d14b4983..a0d842ab 100644 --- a/pos-module-common-styling/modules/common-styling/public/assets/style/pos-forms.css +++ b/pos-module-common-styling/modules/common-styling/public/assets/style/pos-forms.css @@ -91,14 +91,27 @@ align-self: start; } - .pos-form :has([required]:not([type="radio"])) label:after, - .pos-form :has([required]:not([type="radio"])) label strong:after { + /* + The required marker belongs to the field group that holds the required control. + `:has()` is unbounded on its own - `.pos-form :has([required])` is matched by + every ancestor of a required control, not just its group, so any wrapper holding + at least one required control (a `.pos-card` around a set of fieldsets, for + instance) marked every label inside it: optional fields, and fields whose control + is never required at all, such as an upload area. Matching the fieldset keeps the + marker on the group it describes, which is the documented behaviour - labels + placed in a fieldset that has a required input. + */ + .pos-form fieldset:has([required]:not([type="radio"])) label:after, + .pos-form fieldset:has([required]:not([type="radio"])) label strong:after, + .pos-form .pos-form-fieldset:has([required]:not([type="radio"])) label:after, + .pos-form .pos-form-fieldset:has([required]:not([type="radio"])) label strong:after { color: var(--pos-color-important); content: " *"; } - .pos-form :has([required]) label:has(strong):after { + .pos-form fieldset:has([required]) label:has(strong):after, + .pos-form .pos-form-fieldset:has([required]) label:has(strong):after { display: none; } From 01513a968e1e5d005b247b76ac94f54ed8fbb1b0 Mon Sep 17 00:00:00 2001 From: lk316 <51822928+lk316@users.noreply.github.com> Date: Mon, 27 Jul 2026 20:56:43 +0300 Subject: [PATCH 2/2] bumped version --- .../modules/common-styling/pos-module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos-module-common-styling/modules/common-styling/pos-module.json b/pos-module-common-styling/modules/common-styling/pos-module.json index 53ddba02..694b71aa 100644 --- a/pos-module-common-styling/modules/common-styling/pos-module.json +++ b/pos-module-common-styling/modules/common-styling/pos-module.json @@ -1,5 +1,5 @@ { "machine_name": "common-styling", - "version": "1.38.1", + "version": "1.38.2", "name": "platformOS common styling" } \ No newline at end of file