Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dev-app/select/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ng_project(
"//src/material/button",
"//src/material/card",
"//src/material/checkbox",
"//src/material/divider",
"//src/material/form-field",
"//src/material/icon",
"//src/material/input",
Expand Down
4 changes: 3 additions & 1 deletion src/dev-app/select/select-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,14 @@
</mat-card>

<mat-card>
<mat-card-subtitle>Appearance comparison</mat-card-subtitle>
<mat-card-subtitle>Appearance comparison (with dividers)</mat-card-subtitle>
<mat-card-content>
<p>
<mat-form-field appearance="fill">
<mat-label>Fill</mat-label>
<mat-select [(value)]="currentAppearanceValue">
<mat-option>None</mat-option>
<mat-divider />
@for (creature of digimon; track creature) {
<mat-option [value]="creature.value">{{ creature.viewValue }}</mat-option>
}
Expand All @@ -193,6 +194,7 @@
<mat-label>Outline</mat-label>
<mat-select [(value)]="currentAppearanceValue">
<mat-option>None</mat-option>
<mat-divider />
@for (creature of digimon; track creature) {
<mat-option [value]="creature.value">{{ creature.viewValue }}</mat-option>
}
Expand Down
2 changes: 2 additions & 0 deletions src/dev-app/select/select-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {FormControl, FormsModule, ReactiveFormsModule, Validators} from '@angula
import {MatButtonModule} from '@angular/material/button';
import {MatCardModule} from '@angular/material/card';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatDividerModule} from '@angular/material/divider';
import {ErrorStateMatcher, ThemePalette} from '@angular/material/core';
import {FloatLabelType} from '@angular/material/form-field';
import {MatIconModule} from '@angular/material/icon';
Expand Down Expand Up @@ -40,6 +41,7 @@ type DisableDrinkOption = 'none' | 'first-middle-last' | 'all';
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatDividerModule,
MatIconModule,
MatInputModule,
MatSelectModule,
Expand Down
2 changes: 2 additions & 0 deletions src/material/select/_m2-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
@return (
base: (
select-container-elevation-shadow: elevation.get-box-shadow(8),
select-divider-bottom-spacing: 0,
select-divider-top-spacing: 0
Comment on lines +14 to +15
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't really sure here. 0 is the m2 default for mat-menu, but tbh it defies the purpose.

),
color: private-get-color-palette-color-tokens($theme, primary),
typography: (
Expand Down
2 changes: 2 additions & 0 deletions src/material/select/_m3-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ $prefix: (mat, select);
@return (
base: (
select-container-elevation-shadow: elevation.get-box-shadow(2),
select-divider-bottom-spacing: 8px,
select-divider-top-spacing: 8px
),
color: (
select-panel-background-color: map.get($system, surface-container),
Expand Down
5 changes: 5 additions & 0 deletions src/material/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ $fallbacks: m3-select.get-tokens();
}
div.mat-mdc-select-panel {
box-shadow: token-utils.slot(select-container-elevation-shadow, $fallbacks);

.mat-divider {
margin-top: token-utils.slot(select-divider-top-spacing, $fallbacks);
margin-bottom: token-utils.slot(select-divider-bottom-spacing, $fallbacks);
}
}

.mat-mdc-select-disabled {
Expand Down