components icon indicating copy to clipboard operation
components copied to clipboard

feat(mat-select): Add CSS vars for divider spacing

Open moniuch opened this issue 4 months ago • 0 comments

Feature Description

For comparison, In mat-select, there is a pair of CSS vars that control spacing around mat-divider: --mat-menu-divider-bottom-spacing and --mat-menu-divider-top-spacing:

You can use this selector:

.mat-mdc-menu-panel .mat-divider-horizontal {
  --mat-menu-divider-bottom-spacing: 4px;
  --mat-menu-divider-top-spacing: 4px;
}

Unfortunately, there are no corresponding variables for spacing divider within mat-menu, and one needs to use margin-block: ... instead.

I am tempted to ask for introducing it, but at the same time I suspect that maybe it is for some reason discouraged to use mat-divider within mat-menu hence lack of these vars - in which case I would love to know the recommended alternative.

Use Case

No response

moniuch avatar Aug 15 '25 15:08 moniuch