Skip to content

Commit 81558cf

Browse files
Elliott MarquezYaroslav Dubinskyi
andauthored
Add input label before/after pseudo-elements css mixins (#703)
Add input label before/after pseudo-elements css mixins Co-authored-by: Yaroslav Dubinskyi <[email protected]>
2 parents ffae7ff + 62d6595 commit 81558cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

paper-input-container.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ Custom property | Description | Default
152152
`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}`
153153
`--paper-input-prefix` | Mixin applied to the input prefix | `{}`
154154
`--paper-input-suffix` | Mixin applied to the input suffix | `{}`
155+
`--paper-input-container-label-before` | Mixin applied to label before pseudo element | {}
156+
`--paper-input-container-label-after` | Mixin applied to label after pseudo element (useful for required asterisk) | {}
155157
156158
This element is `display:block` by default, but you can set the `inline`
157159
attribute to make it `display:inline-block`.
@@ -270,6 +272,17 @@ Polymer({
270272
@apply --paper-transition-easing;
271273
}
272274
275+
276+
.input-content ::slotted(label):before,
277+
.input-content ::slotted(.paper-input-label):before {
278+
@apply --paper-input-container-label-before;
279+
}
280+
281+
.input-content ::slotted(label):after,
282+
.input-content ::slotted(.paper-input-label):after {
283+
@apply --paper-input-container-label-after;
284+
}
285+
273286
.input-content.label-is-floating ::slotted(label),
274287
.input-content.label-is-floating ::slotted(.paper-input-label) {
275288
-webkit-transform: translateY(-75%) scale(0.75);

0 commit comments

Comments
 (0)