Skip to content

Commit df0bba5

Browse files
committed
repurpose md-fullscreen as md-fill for absolute
1 parent a087c6e commit df0bba5

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This mixin ensures an element spans to fill the nearest ancestor with defined positioning.
2+
@mixin md-fill {
3+
position: absolute;
4+
top: 0;
5+
left: 0;
6+
right: 0;
7+
bottom: 0;
8+
}

src/lib/core/style/_sidenav-common.scss

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/lib/menu/menu.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// TODO(kara): animation for menu opening
33

44
@import '../core/style/button-common';
5-
@import '../core/style/sidenav-common';
5+
@import '../core/style/layout-common';
66
@import '../core/style/menu-common';
77

88
$md-menu-vertical-padding: 8px !default;

src/lib/sidenav/sidenav.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import '../core/style/variables';
22
@import '../core/style/elevation';
3-
@import '../core/style/sidenav-common';
3+
@import '../core/style/layout-common';
44

55

66
// Mixin to help with defining LTR/RTL 'transform: translate3d()' values.
@@ -57,7 +57,7 @@ md-sidenav-layout {
5757

5858
// TODO(hansl): Update this with a more robust solution.
5959
&[fullscreen] {
60-
@include md-fullscreen();
60+
@include md-fill();
6161

6262
&.md-sidenav-opened {
6363
overflow: hidden;
@@ -66,7 +66,7 @@ md-sidenav-layout {
6666
}
6767

6868
.md-sidenav-backdrop {
69-
@include md-fullscreen();
69+
@include md-fill();
7070

7171
display: block;
7272

src/lib/tabs/tab-group.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import '../core/style/variables';
2+
@import '../core/style/layout-common';
23
@import 'tabs-common';
34

45
:host {
@@ -38,12 +39,8 @@ md-ink-bar {
3839

3940
// Wraps each tab body
4041
md-tab-body {
42+
@include md-fill;
4143
display: block;
42-
position: absolute;
43-
top: 0;
44-
right: 0;
45-
bottom: 0;
46-
left: 0;
4744
overflow: hidden;
4845
&.md-tab-body-active {
4946
position: relative;

0 commit comments

Comments
 (0)