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

Discussion for appearance customization #20

Open
jackbsteinberg opened this issue May 29, 2019 · 1 comment
Open

Discussion for appearance customization #20

jackbsteinberg opened this issue May 29, 2019 · 1 comment

Comments

@jackbsteinberg
Copy link
Owner

Open discussion for figuring out the shape of the appearance customization, whether we'll use CSS Shadow Parts, CSS custom properties, or some other styling pattern.

@domenic
Copy link
Collaborator

domenic commented Jul 12, 2019

It seems like most things for the toast itself can be accomplished using normal CSS properties.


For the action button, you can style it using [slot="action"], e.g.

std-toast [slot="action"] {
    color: blue;
    text-transform: uppercase;
}

We could also expose this as pseudo-element, which would allow e.g.

std-toast::part(action) {
    color: blue;
    text-transform: uppercase;
}

but I'm unsure whether that's a good idea. Pseudo-elements are usually for things that are more "hidden" and not just normal elements. I.e. you don't do details::part(summary) { ... }, you do details summary { ... }. The cases aren't exactly the same, as we're allowing any element to be the action via slot="action" instead of restricting it to only summary elements like details does. But I think [slot="action"] is still pretty reasonable.


The close button will probably make sense to style using a pseudo-element, at least using the current design.

domenic added a commit that referenced this issue Jul 12, 2019
domenic added a commit that referenced this issue Jul 12, 2019
domenic added a commit that referenced this issue Jul 12, 2019
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