Skip to content

Commit 1d40be8

Browse files
authored
Merge pull request #37522 from nextcloud/fix/css-placeholder-color
Ungroup `placeholder` css rules to prevent browsers from removing all rules
2 parents 8fe22eb + f8d558e commit 1d40be8

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

core/css/inputs.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/inputs.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/inputs.scss

Lines changed: 17 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)