From 9be2ba6170dae034ee8bb5e03c8612ece551de0c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 17 Apr 2023 23:23:31 +0200 Subject: [PATCH] Introduce some `:is` usage in the xfaLayer CSS Hopefully these changes make sense (since this functionality is new to me), however the existing `xfa`-tests should help avoid any outright regressions. --- web/xfa_layer_builder.css | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/web/xfa_layer_builder.css b/web/xfa_layer_builder.css index 28a26d0a1..921372821 100644 --- a/web/xfa_layer_builder.css +++ b/web/xfa_layer_builder.css @@ -101,14 +101,8 @@ outline: 1.5px solid red; } -.xfaLayer div { - pointer-events: none; -} - -.xfaLayer svg { - pointer-events: none; -} - +.xfaLayer div, +.xfaLayer svg, .xfaLayer svg * { pointer-events: none; } @@ -159,10 +153,7 @@ align-items: center; } -.xfaLeft > .xfaCaption, -.xfaLeft > .xfaCaptionForCheckButton, -.xfaRight > .xfaCaption, -.xfaRight > .xfaCaptionForCheckButton { +:is(.xfaLeft, .xfaRight) > :is(.xfaCaption, .xfaCaptionForCheckButton) { max-height: 100%; } @@ -178,10 +169,7 @@ align-items: flex-start; } -.xfaTop > .xfaCaption, -.xfaTop > .xfaCaptionForCheckButton, -.xfaBottom > .xfaCaption, -.xfaBottom > .xfaCaptionForCheckButton { +:is(.xfaTop, .xfaBottom) > :is(.xfaCaption, .xfaCaptionForCheckButton) { width: 100%; } @@ -196,16 +184,14 @@ height: 100%; } -.xfaTextfield:focus, -.xfaSelect:focus { +:is(.xfaTextfield, .xfaSelect):focus { background-image: none; background-color: transparent; outline: var(--xfa-focus-outline); outline-offset: -1px; } -.xfaCheckbox:focus, -.xfaRadio:focus { +:is(.xfaCheckbox, .xfaRadio):focus { outline: var(--xfa-focus-outline); } @@ -223,10 +209,7 @@ padding-inline: 2px; } -.xfaTop > .xfaTextfield, -.xfaTop > .xfaSelect, -.xfaBottom > .xfaTextfield, -.xfaBottom > .xfaSelect { +:is(.xfaTop, .xfaBottom) > :is(.xfaTextfield, .xfaSelect) { flex: 0 1 auto; } @@ -327,12 +310,7 @@ flex: 1; } -.xfaNonInteractive input, -.xfaNonInteractive textarea, -.xfaDisabled input, -.xfaDisabled textarea, -.xfaReadOnly input, -.xfaReadOnly textarea { +:is(.xfaNonInteractive, .xfaDisabled, .xfaReadOnly) :is(input, textarea) { background: initial; }