Skip to content

Commit

Permalink
Introduce some :is usage in the xfaLayer CSS
Browse files Browse the repository at this point in the history
Hopefully these changes make sense (since this functionality is new to me), however the existing `xfa`-tests should help avoid any outright regressions.
  • Loading branch information
Snuffleupagus committed Apr 17, 2023
1 parent f1b005d commit 9be2ba6
Showing 1 changed file with 8 additions and 30 deletions.
38 changes: 8 additions & 30 deletions web/xfa_layer_builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -159,10 +153,7 @@
align-items: center;
}

.xfaLeft > .xfaCaption,
.xfaLeft > .xfaCaptionForCheckButton,
.xfaRight > .xfaCaption,
.xfaRight > .xfaCaptionForCheckButton {
:is(.xfaLeft, .xfaRight) > :is(.xfaCaption, .xfaCaptionForCheckButton) {
max-height: 100%;
}

Expand All @@ -178,10 +169,7 @@
align-items: flex-start;
}

.xfaTop > .xfaCaption,
.xfaTop > .xfaCaptionForCheckButton,
.xfaBottom > .xfaCaption,
.xfaBottom > .xfaCaptionForCheckButton {
:is(.xfaTop, .xfaBottom) > :is(.xfaCaption, .xfaCaptionForCheckButton) {
width: 100%;
}

Expand All @@ -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);
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9be2ba6

Please sign in to comment.