PolymerElements / paper-toast

A Material Design popup toast
53 stars 29 forks source link

Allow custom styling for paper-toast #107

Open jadjoubran opened 6 years ago

jadjoubran commented 6 years ago

Description

Currently it is not possible to apply custom CSS to the toast. For example changing the padding. Only the background-color and color are customizable via --paper-toast-background-color & --paper-toast-color. The proposed PR #106 adds a --paper-toast mixin similarly to what you could find in <paper-button>'s --paper-button mixin

Expected outcome

Being able to change the padding, margin, and other CSS properties

Actual outcome

Cannot apply custom CSS

Browsers Affected

valdrinkoshi commented 6 years ago

Ideally, I'd prefer avoiding new mixins as the user might apply styles on properties that are required to keep <paper-toast> functioning (e.g. opacity, transition, transform), and rather add new custom css properties where needed. Which ones would be needed exactly?

Though, given that paper-button has the --paper-button mixin, we should probably do the same here for consistency. @notwaldorf @azakus WDYT?

jadjoubran commented 6 years ago

I wanted to change the padding, for my use case however I wanted to set a specific style for all the paper-toasts used in my polymer 2 project (that could be used in nested web components)

I'll wait for the feedback on consistency with paper-button Thanks!