Skip to content

Commit

Permalink
fix(navigationdrawer): tonal surface update
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 522235172
  • Loading branch information
asyncLiz authored and copybara-github committed Apr 6, 2023
1 parent 3934f51 commit 4f9df51
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
21 changes: 10 additions & 11 deletions navigationdrawer/lib/_navigation-drawer-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ $_delay: 0s;
$_transition-duration: 0.25s;

$_reference: (
container-color: #fff,
container-height: 100%,
container-shape: 0 16px 16px 0,
container-surface-tint-layer-color: null,
container-width: 360px,
'container-color': #fff,
'container-height': 100%,
'container-shape': 0 16px 16px 0,
'container-width': 360px,
// TODO(b/216384393): Temporary existing token to use for shadow color
divider-color: #000,
modal-container-elevation: 1,
scrim-color: null,
scrim-opacity: 0.04,
standard-container-elevation: 0,
'divider-color': #000,
'modal-container-elevation': 1,
'scrim-color': null,
'scrim-opacity': 0.04,
'standard-container-elevation': 0,
);

$_custom-property-prefix: 'navigation-drawer-modal';
Expand All @@ -56,7 +55,7 @@ $_custom-property-prefix: 'navigation-drawer-modal';

@include elevation.theme(
(
level: var(--_modal-container-elevation),
'level': var(--_modal-container-elevation),
)
);
}
Expand Down
20 changes: 9 additions & 11 deletions navigationdrawer/lib/_navigation-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ $delay: 0s;
$transition-duration: 0.25s;

$_reference: (
container-color: #fff,
container-height: 100%,
container-shape: 0 16px 16px 0,
container-surface-tint-layer-color: null,
container-width: 360px,
'container-color': #fff,
'container-height': 100%,
'container-shape': 0 16px 16px 0,
'container-width': 360px,
// TODO(b/216384393): Temporary existing token to use for shadow color
divider-color: #000,
modal-container-elevation: 1,
standard-container-elevation: 0,
'divider-color': #000,
'modal-container-elevation': 1,
'standard-container-elevation': 0,
);

$_custom-property-prefix: 'navigation-drawer';
Expand All @@ -52,9 +51,8 @@ $_custom-property-prefix: 'navigation-drawer';

@include elevation.theme(
(
level: var(--_standard-container-elevation),
shadow-color: var(--_divider-color),
surface-tint: var(--_container-surface-tint-layer-color),
'level': var(--_standard-container-elevation),
'shadow-color': var(--_divider-color),
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions navigationdrawer/lib/navigation-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import '../../elevation/elevation-surface.js';
import '../../elevation/elevation.js';

import {html, LitElement, PropertyValues, TemplateResult} from 'lit';
import {property} from 'lit/decorators.js';
Expand Down Expand Up @@ -56,7 +56,7 @@ export class NavigationDrawer extends LitElement {
aria-modal="${this.ariaModal}"
class="md3-navigation-drawer ${this.getRenderClasses()}"
role="dialog">
<md-elevation-surface shadow></md-elevation-surface>
<md-elevation></md-elevation>
<div class="md3-navigation-drawer__slot-content">
<slot></slot>
</div>
Expand Down
3 changes: 1 addition & 2 deletions tokens/_md-comp-navigation-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
@use './md-sys-shape';
@use './md-sys-state';
@use './md-sys-typescale';
// TODO(b/272526637): tonal surface update
@use './v0_161/md-comp-navigation-drawer';
@use './v0_172/md-comp-navigation-drawer';
// go/keep-sorted end

$_default: (
Expand Down

0 comments on commit 4f9df51

Please sign in to comment.