From 9a036b1dfe2f97425d9f7d7fdebf831c4847bc98 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 15 Sep 2022 15:26:06 -0600 Subject: [PATCH] Et2Select: Fix "required" styling did not show in a better way Previous method (38e8df2) made widget entirely transparent --- api/js/etemplate/Et2Select/Et2Select.ts | 4 ---- api/templates/default/etemplate2.css | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index f0997481e6..648b51ce1f 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -80,10 +80,6 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect) sl-menu::part(base) { padding: 0px; } - /* allow required background color to show */ - .select--standard .select__control { - background-color: inherit; - } /* No horizontal scrollbar, even if options are long */ .dropdown__panel { overflow-x: clip; diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index e7279733b2..2ac6a01ff8 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -1996,7 +1996,11 @@ img.vfsMimeIcon[src*="/etemplate/thumbnail.php"] { /** * Validation */ -.et2_required:not(.hasValue), .et2_required:not(.hasValue)::part(base), [required]:not(.hasValue)::part(base) { +.et2_required:not(.hasValue), .et2_required:not(.hasValue)::part(base), .et2_required:not(.hasValue)::part(control), + /* most inputs */ +[required]:not(.hasValue)::part(base), + /* selects */ +[required]:not(.hasValue)::part(control) { background-color: #ffffd0; }