Skip to content

Commit

Permalink
repurpose md-fullscreen as md-fill for absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin committed Nov 9, 2016
1 parent 75f838f commit 98df4f2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
8 changes: 8 additions & 0 deletions src/lib/core/style/_layout-common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This mixin ensures an element spans to fill the nearest ancestor with defined positioning.
@mixin md-fill {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
8 changes: 0 additions & 8 deletions src/lib/core/style/_sidenav-common.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// TODO(kara): animation for menu opening

@import '../core/style/button-common';
@import '../core/style/sidenav-common';
@import '../core/style/layout-common';
@import '../core/style/menu-common';

$md-menu-vertical-padding: 8px !default;
Expand Down
6 changes: 3 additions & 3 deletions src/lib/sidenav/sidenav.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../core/style/variables';
@import '../core/style/elevation';
@import '../core/style/sidenav-common';
@import '../core/style/layout-common';


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

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

&.md-sidenav-opened {
overflow: hidden;
Expand All @@ -66,7 +66,7 @@ md-sidenav-layout {
}

.md-sidenav-backdrop {
@include md-fullscreen();
@include md-fill();

display: block;

Expand Down
7 changes: 2 additions & 5 deletions src/lib/tabs/tab-group.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../core/style/variables';
@import '../core/style/layout-common';
@import 'tabs-common';

:host {
Expand Down Expand Up @@ -38,12 +39,8 @@ md-ink-bar {

// Wraps each tab body
md-tab-body {
@include md-fill;
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
&.md-tab-body-active {
position: relative;
Expand Down

0 comments on commit 98df4f2

Please sign in to comment.