Styling multiple paper-input elements differently

688 views
Skip to first unread message

akhile...@gmail.com

unread,
Sep 17, 2014, 8:31:52 PM9/17/14
to polym...@googlegroups.com
paper-input element exposes couple of styling options via CoreStyle. But using that will apply that style for all paper-input elements on the page. 

How can I selectively modify the styles of different paper-input elements? Is that something supported via CoreStyle?

Eric Bidelman

unread,
Sep 17, 2014, 9:33:48 PM9/17/14
to Akhilesh Gupta, polymer-dev
The docs should mention this, but you can use CSS /deep/ and ::shadow to get at the inner pieces.

    .green /deep/ .focused-underline,
    .green /deep/ .cursor {
      background: green;
      border-bottom-color: green;
    }
    .greent[focused] /deep/ .floated-label {
      color: green;
    }

    <paper-input  class="green" floatingLabel label="I'm green themed using CSS">...


We prefer if folks use CoreStyle because the internals of the shadow dom could (and already have!) changed.


On Wed, Sep 17, 2014 at 5:31 PM, <akhile...@gmail.com> wrote:
paper-input element exposes couple of styling options via CoreStyle. But using that will apply that style for all paper-input elements on the page. 

How can I selectively modify the styles of different paper-input elements? Is that something supported via CoreStyle?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/fb4a2a83-e78c-4163-87a4-1a83476315fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages