Repository navigation
Conversation
c71d635 to
26e60ed
Compare
row detail element can have a top border that increases the height
|
Updated screenshots for grid-pro and CRUD components, please verify them as there are some small changes. |
|
Yeah, thanks. I noticed some remaining issues, currently working on addressing those. I’ll update the screenshots after that. |
fix: grid cell focus outline
…components into fix/grid-base-styles
There was a problem hiding this comment.
The only change in the CRUD screenshots is the border after the last/only item row.
There was a problem hiding this comment.
Oh, I didn't mean to push this screenshot update. I’m not sure what’s going on, maybe some timing issue? The hover style appears as it should locally.
There was a problem hiding this comment.
I will take a closer look.
Something seems wrong with the editable-cell-focus too - the outline in thew new screenshot seems a bit clipped on top, could you please confirm if that is expected?
There was a problem hiding this comment.
This seems to be related to the fact that on MacOS, we use "focus button mode" for cells and on Windows, it's not used. Try commenting out this line and then you will see the problem:
04fdcd0 to
b277f6e
Compare
|
|
I’ll work on splitting this up to separate PRs. I think I should be able to split out the following changes:
|
|
|
||
| // Theme Controls | ||
| const themeControls = ['no-border', 'no-row-borders', 'column-borders', 'row-stripes', 'wrap-cell-content']; | ||
| const themeControls = [ |
There was a problem hiding this comment.
Now when #10198 is merged, this change needs to be applied to dev/playground/grid.html instead.
| } | ||
|
|
||
| :host([navigating]) { | ||
| :is([part~='row'], [part~='cell']):is(:focus, :focus-within :focus-visible) { |
There was a problem hiding this comment.
This combination of :focus, :focus-within :focus-visible is somewhat unclear, is it needed specifically for the focus button mode? Maybe could add a comment clarifying it.
There was a problem hiding this comment.
I’ll re-evaluate this once I get to redoing this in a separate PR. This is the result of me just trying to brute-force the visual tests to pass, without thinking clearly about the behavior or how the implementation works internally.
I think there are some differences between Safari and other browsers regarding focus behavior. Other browsers seem to respect :focus-visible more reliable, whereas in Safari I need to use :host([navigating]) :focus instead.



This change adds a few different custom properties to grid base styles, to easily style various row states:
--vaadin-grid-row-odd-background-color: set this globally to have alternating row colors on all grids. Needs to be a solid/opaque color.--vaadin-grid-row-selected-background-color: background color for selected rows. Can be semi-transparent.--vaadin-grid-row-highlight-background-color: optional highlight color for rows, intended to be used together withcellPartNameGenerator. Can be semi-transparent.--vaadin-grid-row-hover-background-color: background color for hovered rows. Can be semi-transparent.This change also changes how the row borders are rendered together with all the mentioned states.
The previous
--vaadin-grid-cell-border-widthproperty is now divided into separate--vaadin-grid-column-border-widthand--vaadin-grid-row-border-widthproperties, which can be used to set the default borders on all grids. The built-inno-row-bordersandcolumn-bordersvariants are removed, to be left for themes to add if needed.