Created
August 20, 2014 01:33
-
-
Save clintfisher/052040943890ad8ebd46 to your computer and use it in GitHub Desktop.
If nested & use root-selector again - line 56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.0) | |
// Compass (v1.0.0) | |
// ---- | |
@mixin root-selector ($class) { | |
@at-root #{selector-append($class, &)} { | |
@content | |
} | |
} | |
.masthead { | |
width: 768px; | |
&.masthead-theme-standard { | |
background-color: #fff; | |
} | |
&.in-story { | |
position: fixed; | |
} | |
.lt-ie8 & { | |
width: 315px; // ie7 min-width | |
} | |
// responsive | |
.viewport-small-10 & { | |
.flyout-panel { | |
.search-input { | |
width: 270px; | |
} | |
} // end flyout-panel | |
} // end viewport-small-10 | |
// 765 | |
.viewport-medium-10 & { | |
@include root-selector('.lt-ie8') { | |
width: 750px; | |
} | |
.flyout-panel { | |
@include root-selector('.has-xxl') { | |
width: auto; | |
// handle nested | |
@include root-selector('.lt-ie7') { | |
display: inline block; | |
} | |
} | |
.search-input { | |
width: 495px; | |
@include root-selector('.lt-ie9') { | |
width: 250px; | |
} | |
} | |
} // end flyout-panel | |
&.in-story { | |
.notifications-button { | |
display: none; | |
&.new { | |
display: inline-block; | |
@include root-selector('.lt-ie10') { | |
display: inline; | |
} | |
} | |
} // end notifications-button | |
} // end theme-in-story | |
} // end viewport-medium-10 | |
} // end masthead-theme-standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.masthead { | |
width: 768px; | |
} | |
.masthead.masthead-theme-standard { | |
background-color: #fff; | |
} | |
.masthead.in-story { | |
position: fixed; | |
} | |
.lt-ie8 .masthead { | |
width: 315px; | |
} | |
.viewport-small-10 .masthead .flyout-panel .search-input { | |
width: 270px; | |
} | |
.lt-ie8.viewport-medium-10 .masthead { | |
width: 750px; | |
} | |
.has-xxl.viewport-medium-10 .masthead .flyout-panel { | |
width: auto; | |
} | |
.lt-ie7.has-xxl.viewport-medium-10 .masthead .flyout-panel { | |
display: inline block; | |
} | |
.viewport-medium-10 .masthead .flyout-panel .search-input { | |
width: 495px; | |
} | |
.lt-ie9.viewport-medium-10 .masthead .flyout-panel .search-input { | |
width: 250px; | |
} | |
.viewport-medium-10 .masthead.in-story .notifications-button { | |
display: none; | |
} | |
.viewport-medium-10 .masthead.in-story .notifications-button.new { | |
display: inline-block; | |
} | |
.lt-ie10.viewport-medium-10 .masthead.in-story .notifications-button.new { | |
display: inline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment