Skip to content

Commit

Permalink
fix(dialog)!: remove fullscreen tokens
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 551964075
  • Loading branch information
asyncLiz authored and Copybara-Service committed Jul 28, 2023
1 parent b1259ae commit 8b896e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
10 changes: 6 additions & 4 deletions dialog/internal/_dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,9 @@
:host([showing-fullscreen]) .header {
justify-content: space-between;
flex-direction: row;
max-block-size: var(--_fullscreen-header-block-size);
padding-block-start: var(--_fullscreen-container-block-padding);
max-block-size: 56px;
// Note, the 8px here is not per spec, but needed to make the explicit 56px not be cramped.
padding-block-start: 8px;
// TODO: should there be explicit tokens for these?
padding-inline: 4px;
--_header-spacing: 4px;
Expand All @@ -340,8 +341,9 @@
}

:host([showing-fullscreen]) .footer {
max-block-size: var(--_fullscreen-footer-block-size);
padding-block-end: var(--_fullscreen-container-block-padding);
max-block-size: 56px;
// Note, the 8px here is not per spec, but needed to make the explicit 56px not be cramped.
padding-block-end: 8px;
}

// Hide bottom divider on fullscreen since it's common not to have footer actions.
Expand Down
12 changes: 1 addition & 11 deletions dialog/internal/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,7 @@ $_tokens: (
with-divider-divider-color: map.get($_md-sys-color, 'outline')
);

$_fullscreen-tokens: (
fullscreen-header-block-size: 56px,
fullscreen-footer-block-size: 56px,
// Note, the 8px here is not per spec, but needed to make the explicit 56px not be cramped.
fullscreen-container-block-padding: 8px,
);

// Extended token set for dialog.
@function md-comp-dialog-values() {
@return map.merge(
map.merge(tokens.md-comp-dialog-values(), $_tokens),
$_fullscreen-tokens
);
@return map.merge(tokens.md-comp-dialog-values(), $_tokens);
}
10 changes: 0 additions & 10 deletions dialog/internal/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ export class Dialog extends LitElement {
* When showing fullscreen, the header will take up less vertical space, and
* the dialog will have a `showing-fullscreen`attribute, allowing content to
* be styled in this state.
*
* Dialogs can be sized by setting:
*
* * --md-dialog-container-min-block-size
* * --md-dialog-container-max-block-size
* * --md-dialog-container-min-inline-size
* * --md-dialog-container-max-inline-size
*
* These are typically configured via media queries and are independent of the
* fullscreen setting.
*/
@property({type: Boolean}) fullscreen = false;

Expand Down

0 comments on commit 8b896e0

Please sign in to comment.