Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

paper-toggle-button cannot be centered #85

Open
marto55555 opened this issue Mar 5, 2016 · 3 comments
Open

paper-toggle-button cannot be centered #85

marto55555 opened this issue Mar 5, 2016 · 3 comments

Comments

@marto55555
Copy link

paper-toggle-button can no longer be centered in the middle of the page. In the past, I used this code, but it no longer works:
`


`
@bicknellr
Copy link
Contributor

repro here. Looks like we need display: inline-flex;.

@bicknellr
Copy link
Contributor

.. or the display: inline-block; in :host needs to be moved after the mixins overriding it, but I'm not sure what the flex is being used for - it might be needed.

@tonlie
Copy link

tonlie commented Nov 9, 2016

the reason seems to be the absolute left/right margin for the toggle-container implemented in 182ecb2. Setting it to auto (as in margin: 4px auto;) will center it properly.

I'm not sure, why the left/right margin has to be set to 1px, maybe @notwaldorf can help?

Also, if your paper-toggle-button does not need a label, make sure to set the distance between the button and the label to 0px by applying the the --paper-toggle-button-label-spacing mixin, otherwise the button will be slightly offset to the left!

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

No branches or pull requests

3 participants