Repository navigation
experiment: add card base styles and visual tests - #9603
Conversation
I think this is fine for now. It’s more of a concern for actual themes like Lumo and Aura. But we can consider the base colors in the future, if we want to make it easier for themes to manage surface colors. |
That’s okay. We’ll take that into account when migrating Lumo, and we’ll likely opt-in to base styles in this component, so we don't need to duplicate them in Lumo. |
You mean for the title and subtitle? I say we force those to 0. |
|
I’ll fix the CSS version of Lumo. |
web-padawan
left a comment
There was a problem hiding this comment.
Rebased to resolve conflict in card.css after #9621.
|
@jouni seems like the card shadow is incorrect in the CSS version, should we change to use |
If you check the 'Header' checkbox, an |
That content is managed by the app, kinda like custom content, and we don't want to target styles for them. In Lumo, margins are set to zero on h1…h6 elements globally, not by the card styles. |
scroller doesn't have overflow indicators in base styles
This reverts commit cde506a.
|
I’m not sure I understand how the CSS injection stuff should work. But it seems like now Lumo CSS isn't getting picked up by the component at all. |
|
The custom CSS property name was using older |
The media element should go under the border element, so that the border colors the media element as well.
|



New Card base style
Supported custom properties
--vaadin-card-background--vaadin-card-border-color--vaadin-card-border-width--vaadin-card-border-radius--vaadin-card-gap--vaadin-card-padding--vaadin-card-shadow--vaadin-card-media-aspect-ratio--vaadin-card-title-font-size--vaadin-card-title-font-weight--vaadin-card-title-line-height--vaadin-card-subtitle-color--vaadin-card-subtitle-font-size--vaadin-card-subtitle-font-weight--vaadin-card-subtitle-line-heightConcerns