1
|
// this file is based on the pie.scss file which
|
2
|
// demonstrates how to use the CSS PIE extension for
|
3
|
// legacy versions of Internet Explorer. In many cases, PIE will allow
|
4
|
// you to style in CSS things that you'd have to do using image chops otherwise.
|
5
|
|
6
|
// =================== CSS3 PIE =================== //
|
7
|
//
|
8
|
// Note: Each element that has PIE enabled on it will add about 10ms to your page load.
|
9
|
@import "compass/css3/pie";
|
10
|
@import "compass/css3";
|
11
|
|
12
|
// Set this to wherever you end up putting your behavior file.
|
13
|
//
|
14
|
// **Note:** this file must be served as a root-relative resource or
|
15
|
// else IE will interpret it as relative to the current webpage
|
16
|
// instead of the stylesheet.
|
17
|
//
|
18
|
// **Also Note:** this file must be delivered with a mime-type of:
|
19
|
//
|
20
|
// text/x-component
|
21
|
$pie-behavior: url("/polyfills/css3pie/PIE-1.0.0.htc");
|
22
|
|
23
|
// It is suggested that you use Sass's @extend directive to apply the PIE
|
24
|
// behavior to your elements. Setting this variable will tell the `pie` mixin
|
25
|
// to extend it. Or you can just extend the base class yourself.
|
26
|
$pie-base-class: pie-element;
|
27
|
|
28
|
// There are two approaches to creating PIE elements
|
29
|
// The default approach is to make the element position: relative.
|
30
|
.pie-element {
|
31
|
// relative is the default, so passing relative
|
32
|
// is redundant, but we do it here for clarity.
|
33
|
@include pie-element(relative);
|
34
|
}
|
35
|
|
36
|
// use z-indexing. In this case
|
37
|
// an ancestor element before or having the first
|
38
|
// opaque background should be marked as a pie-container
|
39
|
// which gives it a z-index of 0 (actually any z-index
|
40
|
// can be provided to the pie-container mixin).
|
41
|
// And then the pie element itself should be given
|
42
|
// a z-index of -1.
|
43
|
.pie-container {
|
44
|
@include pie-container;
|
45
|
}
|
46
|
|
47
|
.z-pie-element {
|
48
|
// this will get a z-index of 0, you can pass a z-index value if you want
|
49
|
@include pie-element(z-index);
|
50
|
}
|
51
|
|
52
|
// =================== IE legacy styles fixes =================== //
|
53
|
|
54
|
$gutter-width: 40px; // needds to be set to the same value as defined in responsive-sidebars.scss
|
55
|
|
56
|
|
57
|
// all browsers < IE 9
|
58
|
.lt-ie9 {
|
59
|
#page {
|
60
|
@include pie(z-pie-element);
|
61
|
@include pie; // Because $pie-base-class is set, this results in an extend of .pie-element.
|
62
|
}
|
63
|
#header {
|
64
|
/*
|
65
|
* reset right padding to zero and use margin-right instead,
|
66
|
* this avoids the need for background-clip: content-box
|
67
|
* which is not suppoorted in IE < 9
|
68
|
*/
|
69
|
padding-right: 0;
|
70
|
margin-right: $gutter-width / 2;
|
71
|
}
|
72
|
}
|