Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left aligned label #1

Open
nicolasr75 opened this issue Nov 9, 2017 · 1 comment
Open

Left aligned label #1

nicolasr75 opened this issue Nov 9, 2017 · 1 comment

Comments

@nicolasr75
Copy link

Thanks for sharing this component! I used to have hundreds of this type in desktop applications and was badly missing them from day one when I started to port desktop applications to web applications with Polymer.

Just this one issue:
I would like to have the label left aligned so it behaves the same as paper-input. Is there any way to do it with the current version? Alternatively, would it be possible to add an option for it?

I tried to set text-align: left but that also affects the text in the input field which should stay centered (or maybe should be configurable to choose between center and right alignment).

@Zecat
Copy link
Owner

Zecat commented Dec 29, 2017

Hi, this element uses <paper-input-container>, so you should be able to use css mixins and variables described in its doc https://www.webcomponents.org/element/PolymerElements/paper-input/elements/paper-input-container.

This should do the trick:

paper-number-input {
  --paper-input-container-label: {
    text-align: left;
  };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants