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

[date-time-picker] Replace custom date-picker and time-picker extensions with original components #5250

Closed
web-padawan opened this issue Jan 6, 2023 · 1 comment · Fixed by #5251
Assignees
Labels
refactor Internal improvement requires new major This would be a breaking change v24 To be done in V24 vaadin-date-time-picker

Comments

@web-padawan
Copy link
Member

web-padawan commented Jan 6, 2023

Describe your motivation

Currently, vaadin-date-time-picker uses two extensions of vaadin-date-picker and vaadin-time-picker element.
This introduces complexity for native CSS styling, because users need to keep in mind these different tag names.

Note, actual extensions don't override any functionality (at least in the current version) and are just basic classes:

Describe the solution you'd like

  1. Remove custom extensions and instead change the component to use vaadin-date-picker and vaadin-time-picker;
  2. Update themes to replace ThemableMixin styles with selectors like ::part(input-field) to apply rounded borders:

[part~='input-field'] {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

[part~='input-field'] {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

This only applies to Lumo, and in Material theme we don't have any CSS customizations for these picker extensions.

Additional context

This hasn't been added to the original V24 styling breaking changes, but IMO there is still time to include this change.

@web-padawan web-padawan added requires new major This would be a breaking change vaadin-date-time-picker refactor Internal improvement v24 To be done in V24 labels Jan 6, 2023
@web-padawan web-padawan self-assigned this Jan 6, 2023
@web-padawan
Copy link
Member Author

Looks like we can't use ::part() after ::slotted() - see w3c/csswg-drafts#5161 and w3c/csswg-drafts#3896.
However, we can still implement this border radius thing using SlotStylesMixin and custom CSS properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Internal improvement requires new major This would be a breaking change v24 To be done in V24 vaadin-date-time-picker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant