summaryrefslogtreecommitdiffstats
path: root/STARTERKIT/sass/_base.scss
blob: 693c41813a31e241e013706dd9d256425bcd6d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
// Partials to be shared with all .scss files.
//
// To make it easier to use all variables and mixins in any Sass file in this
// theme, each .scss file has a @import "base" declaration. And this _base.scss
// file is in charge of importing all the other partials needed for the theme.

@import "compass/support"; // Add Compass' IE and vendor prefix support variables.
@import "variables";       // Add your own shared variables here.

@import "zen";
@import "compass/css3";


//
// Sass mixins
//
// To use a mixin in this file, add this line to the top of your .scss file:
//   @import "base";
// Then to use a mixin for a particular rule, add this inside the ruleset's
// curly brackets:
//   @include mix-in-name;


// clearfix as defined by Drupal
@mixin clearfix {
  &:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
  }
  // IE6
  @if $legacy-support-for-ie6 {
    .ie6 & {
      height: 1%;
    }
  }
  // IE7
  @if $legacy-support-for-ie7 {
    .ie7 & {
      min-height: 1%;
    }
  }
}

// element-invisible as defined by http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
@mixin element-invisible {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    clip: rect(1px 1px 1px 1px); // IE6 and IE7 use the wrong syntax.
  }
  clip: rect(1px, 1px, 1px, 1px);
}

// Turns off the element-invisible effect.
@mixin element-invisible-off {
  position: static !important;
  clip: auto;
  height: auto;
  width: auto;
  overflow: auto;
}

@mixin element-focusable {
  @include element-invisible;

  &:active,
  &:focus {
    @include element-invisible-off;
  }
}

// The word "Unpublished" displayed underneath unpublished nodes and comments.
@mixin unpublished-div {
  height: 0;
  overflow: visible;
  color: #d8d8d8;
  font-size: 75px;
  line-height: 1;
  font-family: Impact, "Arial Narrow", Helvetica, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  word-wrap: break-word; // A very nice CSS3 property

  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    .ie6-7 &>* {
      position: relative; // Otherwise these elements will appear below the "Unpublished" text.
    }
  }
}