Skip to content

[button] Consider removing internal stylable parts #955

Open

Description

@jouni

The stylable parts (prefix, suffix, and label) I introduced a while ago don’t really make much sense semantically. I’m considering we should remove them.

That said, removing them means that themes can’t target them, and that in turn makes it difficult to make baseline alignment work like it does currently, because we would only be able ot set the font-size and line-height on the host (which affects the baseline alignment).

Activity

  1. changed the title [-]Button should not have internal stylable parts[/-] [+][button] Consider removing internal stylable parts[/+] on May 28, 2021
  2. web-padawan commented on Aug 23, 2021

    @web-padawan
    Member

    We have discussed this and agreed about the following:

    1. Let's remove spans and prefix & suffix parts (but keep the corresponding slots)
    2. Let's not abuse slot elements for styling and instead style slotted content directly
    3. We can use selectors like slot[name='prefix'] ::slotted(*) to apply margins etc
    4. Users will be able to override these styles because the content is in the light DOM
    5. Note, we also remove label part (already removed in the new implementation)
    6. As a result, there will be only button part exposed by vaadin-button component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions