-
-
Save sambody/8393353 to your computer and use it in GitHub Desktop.
Compass, Susy configuration, with separate stylesheet for IE8 (automatically)
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
$is-ie8: false !default; | |
// Compass cross-browser support configuration | |
$legacy-support-for-ie6: false; | |
$legacy-support-for-ie7: false; | |
$legacy-support-for-ie8: true; | |
// Susy settings | |
// ------------------------------------------------ | |
// Mobile first fluid grid | |
$total-columns: 4; | |
$column-width: (60px / $base-font-size) + 0em; | |
$gutter-width: (20px / $base-font-size) + 0em; | |
$grid-padding: (20px / $base-font-size) + 0em; | |
$container-style: fluid; | |
// Breakpoints | |
$tablet: ((569px / $base-font-size) + 0em) 8 lt-ie9; // min-width, 8 columns, ie8 class | |
$tablet-only: ((569px / $base-font-size) + 0em) 8 ((1024px / $base-font-size) + 0em); | |
$tablet-max: 8 ((1024px / $base-font-size) + 0em); // 8 columns, max-width | |
$desktop: ((1025px / $base-font-size) + 0em) 12 lt-ie9; | |
// In IE 8 all at-breakpoint blocks except $desktop are omitted. (??) | |
// $desktop at-breakpoint blocks are scoped to a .lt-ie9 class instead of the desktop media query. | |
$breakpoint-media-output: not $is-ie8; | |
$breakpoint-ie-output: $is-ie8; |
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
@media { | |
@if $is-ie8 { | |
$container-style: static; // Sets static width for old IE | |
} @else { | |
$container-style: magic; // Sets a max-width and fluid grid | |
} | |
} | |
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
.my-module { | |
color: chartreuse; | |
@if $is-ie8 { | |
position: relative; | |
zoom: 1; | |
} | |
} | |
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
<!DOCTYPE html> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> | |
<head> | |
<!--[if (gte IE 9)|!(IE)]><!--><link rel="stylesheet" href="styles/application.css"><!--<![endif]--> | |
<!--[if IE 7]><link rel="stylesheet" href="styles/application-ie7.css"><![endif]--> | |
<!--[if IE 8]><link rel="stylesheet" href="styles/application-ie8.css"><![endif]--> | |
</head> |
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
$is-ie8: true; | |
@import 'styles'; |
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
// import all your partials | |
@import 'config'; | |
@import 'device'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment