Skip to content

Commit

Permalink
document calculated css properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Oct 2, 2024
1 parent 1dbb20f commit e808f23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/dashboard/src/vaadin-dashboard-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const hasWidgetWrappers = css`
export const dashboardWidgetAndSectionStyles = css`
:host {
box-sizing: border-box;
/* Calculates the offset by which mode buttons that by default overflow the widget edges
should be shifted inwards based on a custom --vaadin-dashboard-spacing value */
--_mode-button-spacing-offset: calc(
max(0px, var(--_vaadin-dashboard-default-spacing) - var(--_vaadin-dashboard-spacing))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const dashboardWidgetAndSection = css`
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
--_focus-ring-spacing-max-offset: 0px;
/* Calculates the offset by which the focus ring should be shifted inwards based on a custom --vaadin-dashboard-spacing value.
Effectively keeps the focus ring visible if --vaadin-dashboard-spacing is set to 0px */
--_focus-ring-spacing-offset: min(
max(calc(var(--_focus-ring-width) * -1), var(--_vaadin-dashboard-spacing) - var(--_focus-ring-width)),
var(--_focus-ring-spacing-max-offset, 0px)
Expand Down

0 comments on commit e808f23

Please sign in to comment.