Reputation: 843
We are trying to turn off paper input container style so that we can have all around border for input box and no animation on focus.
In custom polymer component, we were able to get what we want by disable the following mixin in custom polymer component style section:
--paper-input-container-underline
--paper-input-container-underline-focused
However, when copying the same style section out onto html and use paper-input-container, it is not taking. Is there a way to apply these mixin outside of custom polymer component? I am guessing my css syntax is wrong.
<style>
paper-input-container{
--paper-input-container-underline: {visibility: hidden};
--paper-input-container-underline-focused: {visibility: hidden};
}
</style>
thanks!
Upvotes: 0
Views: 629
Reputation: 138336
I assume you meant you moved the style into index.html
...
First, CSS mixins and properties from index.html
are only applied in Polymer when they're in custom-style
s:
<style is="custom-style">
...
</style>
Second, your CSS selector needs to be adjusted to target the paper-input-container
, as paper-input-container
alone won't work. If you want to target only paper-input-container
s in x-foo
elements, then you'd write:
x-foo {
--paper-input-container-underline: {visibility: hidden};
--paper-input-container-underline-focused: {visibility: hidden};
}
Or if you want to target all paper-input-container
s in any element, you'd use :root
(deprecated) or html
as your selector:
html {
--paper-input-container-underline: {visibility: hidden};
--paper-input-container-underline-focused: {visibility: hidden};
}
Upvotes: 3