Skip to content

Commit f71f86d

Browse files
committed
fix(core): Ungroup placeholder css rules to prevent browsers from removing all rules
When rules are grouped using the comma operator and one selector is invalid / unknown then the whole group is invalidated[1]. In this case `::-ms-input-placeholder` is unknown to Firefox and Chrome, so the `::placeholder` rule is never applied. [1]: https://www.w3.org/TR/selectors-3/#grouping Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent 8f0da6b commit f71f86d

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

core/css/inputs.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/inputs.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/inputs.scss

+17-4
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,22 @@ label.infield {
826826
overflow: hidden;
827827
}
828828

829-
::placeholder,
830-
::-ms-input-placeholder,
831-
::-webkit-input-placeholder {
829+
// when rules are grouped using the comma operator and one selector is invalid / unknown then the whole group is invalidated.
830+
// https://www.w3.org/TR/selectors-3/#grouping
831+
// In this case `::-ms-input-placeholder` is unknown to Firefox and Chrome
832+
@mixin placeholder-style {
832833
color: var(--color-text-maxcontrast);
833-
font-size: var(--default-font-size);
834+
font-size: var(--default-font-size);
835+
}
836+
837+
::placeholder {
838+
@include placeholder-style;
839+
}
840+
841+
::-ms-input-placeholder {
842+
@include placeholder-style;
843+
}
844+
845+
::-webkit-input-placeholder {
846+
@include placeholder-style;
834847
}

core/css/server.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)