Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 089de51

Browse files
sayriscopybara-github
authored andcommitted
feat(dialog): Adds and defines styling for the "header bar" on a full-screen dialog.
Note that full-screen dialogs are not ready for use. PiperOrigin-RevId: 350834168
1 parent 9c8a70a commit 089de51

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

packages/mdc-dialog/_mixins.scss

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
//
2222

2323
// Selector '.mdc-*' should only be used in this project.
24-
// stylelint-disable selector-class-pattern
24+
// stylelint-disable selector-class-pattern --
25+
// Internal styling for Dialog MDC component.
2526

2627
@use 'sass:math';
2728
@use '@material/animation/functions' as animation-functions;
@@ -36,6 +37,7 @@
3637
@use '@material/touch-target/variables' as touch-target-variables;
3738
@use '@material/typography/typography';
3839
@use './dialog-custom-properties';
40+
@use '@material/icon-button/mixins' as iconbutton-mixins;
3941
@use './variables';
4042

4143
@mixin core-styles($query: feature-targeting.all()) {
@@ -169,6 +171,30 @@
169171
}
170172
}
171173

174+
.mdc-dialog--fullscreen {
175+
.mdc-dialog__header {
176+
@include feature-targeting.targets($feat-structure) {
177+
display: inline-flex;
178+
padding: 0 variables.$header-side-padding
179+
variables.$title-bottom-padding;
180+
border-bottom: 1px solid transparent;
181+
justify-content: space-between;
182+
align-items: baseline;
183+
}
184+
}
185+
186+
.mdc-dialog__title {
187+
@include feature-targeting.targets($feat-structure) {
188+
padding: 0;
189+
border-bottom: 0;
190+
}
191+
}
192+
193+
.mdc-dialog__close {
194+
@include iconbutton-mixins.size($size: 24px, $query: $query);
195+
}
196+
}
197+
172198
.mdc-dialog__content {
173199
@include typography.typography(body1, $query: $query);
174200

packages/mdc-dialog/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ $margin: 16px !default;
3636
$shape-radius: medium !default;
3737
$title-bottom-padding: 9px !default;
3838
$actions-padding: 8px !default;
39+
$header-side-padding: 16px !default;
3940

4041
$z-index: 7 !default;

packages/mdc-dialog/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@material/dom": "^9.0.0",
2626
"@material/elevation": "^9.0.0",
2727
"@material/feature-targeting": "^9.0.0",
28+
"@material/icon-button": "^9.0.0",
2829
"@material/ripple": "^9.0.0",
2930
"@material/rtl": "^9.0.0",
3031
"@material/shape": "^9.0.0",

0 commit comments

Comments
 (0)