Skip to content

Commit

Permalink
fix(notched-outline): Add mixin for common code.
Browse files Browse the repository at this point in the history
  • Loading branch information
williamernest committed Aug 23, 2018
1 parent 21ba2a4 commit 93c260c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 9 additions & 0 deletions packages/mdc-notched-outline/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@
border-radius: $radius;
}
}

@mixin mdc-notched-outline-base_ {
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
width: 100%;
height: 100%;
}
16 changes: 4 additions & 12 deletions packages/mdc-notched-outline/mdc-notched-outline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@
// Notched Outline is intended for use by multiple components, but its styles should only be emitted once when bundled
@include mdc-base-emit-once("mdc-notched-outline") {
.mdc-notched-outline {
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
width: 100%;
height: 100%;
@include mdc-notched-outline-base_;

transition: opacity $mdc-notched-outline-transition-duration $mdc-animation-standard-curve-timing-function;
opacity: 0;
text-align: left;
Expand All @@ -54,12 +50,8 @@
}

.mdc-notched-outline__idle {
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
width: 100%;
height: 100%;
@include mdc-notched-outline-base_;

transition:
opacity $mdc-notched-outline-transition-duration $mdc-animation-standard-curve-timing-function,
border-color $mdc-notched-outline-transition-duration $mdc-animation-standard-curve-timing-function;
Expand Down

0 comments on commit 93c260c

Please sign in to comment.