Skip to content

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

@moniuch

Description

@moniuch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/selectfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions