paper-input icon indicating copy to clipboard operation
paper-input copied to clipboard

Import of typography.html overrides any --paper-font-common-base mixin set.

Open KeithHenry opened this issue 8 years ago • 1 comments

paper-input imports ../paper-styles/typography.html in three places:

https://github.com/PolymerElements/paper-input/blob/56089b9e2e6609fc1d0e3a34be9a9e332f2a1b4b/paper-input-container.html#L14

https://github.com/PolymerElements/paper-input/blob/0a50e7670f20db308338278b3c9f20828980b490/paper-input-error.html#L13

https://github.com/PolymerElements/paper-input/blob/0a50e7670f20db308338278b3c9f20828980b490/paper-input-char-counter.html#L12

Each of these will cause any --paper-font-common-base mixin that is already set to be overridden with the typography.

Instead paper-input should not re-import typography.html, but it should include a comment similar to paper-radio-button's approach:

/*
This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`.
In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.
*/

See also this issue on paper-styles and this SO question.

KeithHenry avatar Oct 30 '17 07:10 KeithHenry

Paper elements should have consistency over --paper-font-common-base. I'd vote for paper-radio-button's approach as @KeithHenry suggested.

renfeng avatar Oct 30 '17 11:10 renfeng