inuit_rails 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/inuit_rails.gemspec +23 -0
- data/lib/generators/inuit_rails/install_generator.rb +23 -0
- data/lib/generators/inuit_rails/templates/inuit_override.css.scss +209 -0
- data/lib/inuit_rails.rb +6 -0
- data/lib/inuit_rails/version.rb +3 -0
- data/vendor/assets/stylesheets/_defaults.scss +226 -0
- data/vendor/assets/stylesheets/_inuit.scss +215 -0
- data/vendor/assets/stylesheets/base/_code.scss +63 -0
- data/vendor/assets/stylesheets/base/_forms.scss +174 -0
- data/vendor/assets/stylesheets/base/_headings.scss +45 -0
- data/vendor/assets/stylesheets/base/_images.scss +73 -0
- data/vendor/assets/stylesheets/base/_lists.scss +19 -0
- data/vendor/assets/stylesheets/base/_main.scss +13 -0
- data/vendor/assets/stylesheets/base/_massive_print.scss +16 -0
- data/vendor/assets/stylesheets/base/_quotes.scss +98 -0
- data/vendor/assets/stylesheets/base/_small_print.scss +13 -0
- data/vendor/assets/stylesheets/base/_tables.scss +163 -0
- data/vendor/assets/stylesheets/generic/_brand.scss +18 -0
- data/vendor/assets/stylesheets/generic/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/generic/_debug.scss +168 -0
- data/vendor/assets/stylesheets/generic/_helper.scss +184 -0
- data/vendor/assets/stylesheets/generic/_inline_block_fix.scss +14 -0
- data/vendor/assets/stylesheets/generic/_inline_block_whitespace_fix.scss +13 -0
- data/vendor/assets/stylesheets/generic/_mixins.scss +341 -0
- data/vendor/assets/stylesheets/generic/_normalize.scss +396 -0
- data/vendor/assets/stylesheets/generic/_pull.scss +147 -0
- data/vendor/assets/stylesheets/generic/_push.scss +147 -0
- data/vendor/assets/stylesheets/generic/_reset.scss +85 -0
- data/vendor/assets/stylesheets/generic/_shared.scss +61 -0
- data/vendor/assets/stylesheets/generic/_widths.scss +158 -0
- data/vendor/assets/stylesheets/objects/_arrows.scss +147 -0
- data/vendor/assets/stylesheets/objects/_beautons.scss +218 -0
- data/vendor/assets/stylesheets/objects/_block-list.scss +45 -0
- data/vendor/assets/stylesheets/objects/_columns.scss +22 -0
- data/vendor/assets/stylesheets/objects/_flexbox.scss +55 -0
- data/vendor/assets/stylesheets/objects/_flyout.scss +80 -0
- data/vendor/assets/stylesheets/objects/_greybox.scss +58 -0
- data/vendor/assets/stylesheets/objects/_grids.scss +76 -0
- data/vendor/assets/stylesheets/objects/_icon-text.scss +40 -0
- data/vendor/assets/stylesheets/objects/_island.scss +38 -0
- data/vendor/assets/stylesheets/objects/_link-complex.scss +32 -0
- data/vendor/assets/stylesheets/objects/_lozenges.scss +46 -0
- data/vendor/assets/stylesheets/objects/_marginalia.scss +52 -0
- data/vendor/assets/stylesheets/objects/_matrix.scss +89 -0
- data/vendor/assets/stylesheets/objects/_media.scss +60 -0
- data/vendor/assets/stylesheets/objects/_nav.scss +155 -0
- data/vendor/assets/stylesheets/objects/_nav__breadcrumb.scss +67 -0
- data/vendor/assets/stylesheets/objects/_nav__options.scss +45 -0
- data/vendor/assets/stylesheets/objects/_nav__pagination.scss +53 -0
- data/vendor/assets/stylesheets/objects/_rules.scss +63 -0
- data/vendor/assets/stylesheets/objects/_split.scss +39 -0
- data/vendor/assets/stylesheets/objects/_sprite.scss +98 -0
- data/vendor/assets/stylesheets/objects/_stats.scss +52 -0
- data/vendor/assets/stylesheets/objects/_this-or-this.scss +38 -0
- metadata +131 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$BRAND
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* `.brand` is a quick and simple way to apply your brand face and/or color to
|
6
|
+
* any element using a handy helper class.
|
7
|
+
*/
|
8
|
+
.brand{
|
9
|
+
font-family:$brand-face +!important;
|
10
|
+
color:$brand-color +!important;
|
11
|
+
}
|
12
|
+
.brand-face{
|
13
|
+
font-family:$brand-face +!important;
|
14
|
+
}
|
15
|
+
.brand-color,
|
16
|
+
.brand-colour{
|
17
|
+
color:$brand-color +!important;
|
18
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$CLEARFIX
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Micro clearfix, as per: css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
|
6
|
+
* Extend the clearfix class with Sass to avoid the `.cf` class appearing over
|
7
|
+
* and over in your markup.
|
8
|
+
*/
|
9
|
+
.cf{
|
10
|
+
&:after{
|
11
|
+
content:"";
|
12
|
+
display:table;
|
13
|
+
clear:both;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,168 @@
|
|
1
|
+
@if $debug-mode == true{
|
2
|
+
/*------------------------------------*\
|
3
|
+
$DEBUG
|
4
|
+
\*------------------------------------*/
|
5
|
+
/**
|
6
|
+
* Enable this stylesheet to visually detect any improperly nested or
|
7
|
+
* potentially invalid markup, or any potentially inaccessible code.
|
8
|
+
*
|
9
|
+
* Red == definite error
|
10
|
+
* Yellow == double-check
|
11
|
+
* None == should be fine
|
12
|
+
*
|
13
|
+
* Please note that this method of checking markup quality should not be relied
|
14
|
+
* upon entirely. Validate your markup!
|
15
|
+
*/
|
16
|
+
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Are there any empty elements in your page?
|
20
|
+
*/
|
21
|
+
:empty{
|
22
|
+
outline:5px solid yellow;
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Images require `alt` attributes, empty `alt`s are fine but should be
|
28
|
+
* double-checked, no `alt` is bad and is flagged red.
|
29
|
+
*/
|
30
|
+
img{
|
31
|
+
outline:5px solid red;
|
32
|
+
}
|
33
|
+
img[alt]{
|
34
|
+
outline:none;
|
35
|
+
}
|
36
|
+
img[alt=""]{
|
37
|
+
outline:5px solid yellow;
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Links sometimes, though not always, benefit from `title` attributes. Links
|
43
|
+
* without are never invalid but it’s a good idea to check.
|
44
|
+
*/
|
45
|
+
a{
|
46
|
+
outline:5px solid yellow;
|
47
|
+
}
|
48
|
+
a[title]{
|
49
|
+
outline:none;
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Double-check any links whose `href` is something questionable.
|
55
|
+
*/
|
56
|
+
a[href="#"],
|
57
|
+
a[href*="javascript"]{
|
58
|
+
outline:5px solid yellow;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
/**
|
63
|
+
* The `target` attribute ain’t too nice...
|
64
|
+
*/
|
65
|
+
a[target]{
|
66
|
+
outline:5px solid yellow;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Ensure any lists only contain `li`s as children.
|
72
|
+
*/
|
73
|
+
ul,
|
74
|
+
ol{
|
75
|
+
> *:not(li){
|
76
|
+
outline:5px solid red;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
/**
|
82
|
+
* It’s always nice to give `th`s `scope` attributes.
|
83
|
+
*/
|
84
|
+
th{
|
85
|
+
outline:5px solid yellow;
|
86
|
+
}
|
87
|
+
th[scope]{
|
88
|
+
outline:none;
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
/**
|
93
|
+
* `tr`s as children of `table`s ain’t great, did you need a `thead`/`tbody`?
|
94
|
+
*/
|
95
|
+
table > tr{
|
96
|
+
outline:5px solid yellow;
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
/**
|
101
|
+
* `tfoot` needs to come *before* `tbody`.
|
102
|
+
*/
|
103
|
+
tbody + tfoot{
|
104
|
+
outline:5px solid yellow;
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Forms require `action` attributes
|
110
|
+
*/
|
111
|
+
form{
|
112
|
+
outline:5px solid red;
|
113
|
+
}
|
114
|
+
form[action]{
|
115
|
+
outline:none;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Various form-field types have required attributes. `input`s need `type`
|
121
|
+
* attributes, `textarea`s need `rows` and `cols` attributes and submit buttons
|
122
|
+
* need a `value` attribute.
|
123
|
+
*/
|
124
|
+
textarea,
|
125
|
+
input{
|
126
|
+
outline:5px solid red;
|
127
|
+
}
|
128
|
+
input[type]{
|
129
|
+
outline:none;
|
130
|
+
}
|
131
|
+
textarea[rows][cols]{
|
132
|
+
outline:none;
|
133
|
+
}
|
134
|
+
input[type=submit]{
|
135
|
+
outline:5px solid red;
|
136
|
+
}
|
137
|
+
input[type=submit][value]{
|
138
|
+
outline:none;
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Avoid inline styles where possible.
|
144
|
+
*/
|
145
|
+
[style]{
|
146
|
+
outline:5px solid yellow;
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
/**
|
151
|
+
* You should avoid using IDs for CSS, is this doing any styling?
|
152
|
+
*/
|
153
|
+
[id]{
|
154
|
+
outline:5px solid yellow;
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Are you using the grid system correctly?
|
160
|
+
*/
|
161
|
+
.gw > :not(.g),
|
162
|
+
.grid-wrapper > :not(.grid),
|
163
|
+
.gw--rev > :not(.g),
|
164
|
+
.grid-wrapper--rev > :not(.grid){
|
165
|
+
outline:5px solid red;
|
166
|
+
}
|
167
|
+
|
168
|
+
}/* endif */
|
@@ -0,0 +1,184 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$HELPER
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* A series of helper classes to use arbitrarily. Only use a helper class if an
|
6
|
+
* element/component doesn’t already have a class to which you could apply this
|
7
|
+
* styling, e.g. if you need to float `.main-nav` left then add `float:left;` to
|
8
|
+
* that ruleset as opposed to adding the `.float--left` class to the markup.
|
9
|
+
*
|
10
|
+
* A lot of these classes carry `!important` as you will always want them to win
|
11
|
+
* out over other selectors.
|
12
|
+
*/
|
13
|
+
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Add/remove floats
|
17
|
+
*/
|
18
|
+
.float--right { float:right!important; }
|
19
|
+
.float--left { float:left !important; }
|
20
|
+
.float--none { float:none !important; }
|
21
|
+
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Text alignment
|
25
|
+
*/
|
26
|
+
.text--left { text-align:left !important; }
|
27
|
+
.text--center { text-align:center!important; }
|
28
|
+
.text--right { text-align:right !important; }
|
29
|
+
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Font weights
|
33
|
+
*/
|
34
|
+
.weight--light { font-weight:300!important; }
|
35
|
+
.weight--normal { font-weight:400!important; }
|
36
|
+
.weight--semibold { font-weight:600!important; }
|
37
|
+
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Add/remove margins
|
41
|
+
*/
|
42
|
+
.push { margin: $base-spacing-unit!important; }
|
43
|
+
.push--top { margin-top: $base-spacing-unit!important; }
|
44
|
+
.push--right { margin-right: $base-spacing-unit!important; }
|
45
|
+
.push--bottom { margin-bottom:$base-spacing-unit!important; }
|
46
|
+
.push--left { margin-left: $base-spacing-unit!important; }
|
47
|
+
.push--ends { margin-top: $base-spacing-unit!important; margin-bottom:$base-spacing-unit!important; }
|
48
|
+
.push--sides { margin-right: $base-spacing-unit!important; margin-left: $base-spacing-unit!important; }
|
49
|
+
|
50
|
+
.push-half { margin: $half-spacing-unit!important; }
|
51
|
+
.push-half--top { margin-top: $half-spacing-unit!important; }
|
52
|
+
.push-half--right { margin-right: $half-spacing-unit!important; }
|
53
|
+
.push-half--bottom { margin-bottom:$half-spacing-unit!important; }
|
54
|
+
.push-half--left { margin-left: $half-spacing-unit!important; }
|
55
|
+
.push-half--ends { margin-top: $half-spacing-unit!important; margin-bottom:$half-spacing-unit!important; }
|
56
|
+
.push-half--sides { margin-right: $half-spacing-unit!important; margin-left: $half-spacing-unit!important; }
|
57
|
+
|
58
|
+
.flush { margin: 0!important; }
|
59
|
+
.flush--top { margin-top: 0!important; }
|
60
|
+
.flush--right { margin-right: 0!important; }
|
61
|
+
.flush--bottom { margin-bottom:0!important; }
|
62
|
+
.flush--left { margin-left: 0!important; }
|
63
|
+
.flush--ends { margin-top: 0!important; margin-bottom:0!important; }
|
64
|
+
.flush--sides { margin-right: 0!important; margin-left: 0!important; }
|
65
|
+
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Add/remove paddings
|
69
|
+
*/
|
70
|
+
.soft { padding: $base-spacing-unit!important; }
|
71
|
+
.soft--top { padding-top: $base-spacing-unit!important; }
|
72
|
+
.soft--right { padding-right: $base-spacing-unit!important; }
|
73
|
+
.soft--bottom { padding-bottom:$base-spacing-unit!important; }
|
74
|
+
.soft--left { padding-left: $base-spacing-unit!important; }
|
75
|
+
.soft--ends { padding-top: $base-spacing-unit!important; padding-bottom:$base-spacing-unit!important; }
|
76
|
+
.soft--sides { padding-right: $base-spacing-unit!important; padding-left: $base-spacing-unit!important; }
|
77
|
+
|
78
|
+
.soft-half { padding: $half-spacing-unit!important; }
|
79
|
+
.soft-half--top { padding-top: $half-spacing-unit!important; }
|
80
|
+
.soft-half--right { padding-right: $half-spacing-unit!important; }
|
81
|
+
.soft-half--bottom { padding-bottom:$half-spacing-unit!important; }
|
82
|
+
.soft-half--left { padding-left: $half-spacing-unit!important; }
|
83
|
+
.soft-half--ends { padding-top: $half-spacing-unit!important; padding-bottom:$half-spacing-unit!important; }
|
84
|
+
.soft-half--sides { padding-right: $half-spacing-unit!important; padding-left: $half-spacing-unit!important; }
|
85
|
+
|
86
|
+
.hard { padding: 0!important; }
|
87
|
+
.hard--top { padding-top: 0!important; }
|
88
|
+
.hard--right { padding-right: 0!important; }
|
89
|
+
.hard--bottom { padding-bottom:0!important; }
|
90
|
+
.hard--left { padding-left: 0!important; }
|
91
|
+
.hard--ends { padding-top: 0!important; padding-bottom:0!important; }
|
92
|
+
.hard--sides { padding-right: 0!important; padding-left: 0!important; }
|
93
|
+
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Pull items full width of `.island` parents.
|
97
|
+
*/
|
98
|
+
.full-bleed{
|
99
|
+
margin-right:-$base-spacing-unit!important;
|
100
|
+
margin-left: -$base-spacing-unit!important;
|
101
|
+
|
102
|
+
.islet &{
|
103
|
+
margin-right:-($half-spacing-unit)!important;
|
104
|
+
margin-left: -($half-spacing-unit)!important;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Add a help cursor to any element that gives the user extra information on
|
111
|
+
* `:hover`.
|
112
|
+
*/
|
113
|
+
.informative{
|
114
|
+
cursor:help!important;
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Mute an object by reducing its opacity.
|
120
|
+
*/
|
121
|
+
.muted{
|
122
|
+
opacity:0.5!important;
|
123
|
+
filter:alpha(opacity = 50)!important;
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Align items to the right where they imply progression/movement forward, e.g.:
|
129
|
+
*
|
130
|
+
<p class=proceed><a href=#>Read more...</a></p>
|
131
|
+
*
|
132
|
+
*/
|
133
|
+
.proceed{
|
134
|
+
text-align:right!important;
|
135
|
+
}
|
136
|
+
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Add a right-angled quote to links that imply movement, e.g.:
|
140
|
+
*
|
141
|
+
<a href=# class=go>Read more</a>
|
142
|
+
*
|
143
|
+
*/
|
144
|
+
.go:after{
|
145
|
+
content:"\00A0" "\00BB"!important;
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Apply capital case to an element (usually a `strong`).
|
151
|
+
*/
|
152
|
+
.caps{
|
153
|
+
text-transform:uppercase!important;
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Hide content off-screen without resorting to `display:none;`, also provide
|
159
|
+
* breakpoint specific hidden elements.
|
160
|
+
*/
|
161
|
+
@mixin accessibility{
|
162
|
+
border:0!important;
|
163
|
+
clip:rect(0 0 0 0)!important;
|
164
|
+
height:1px!important;
|
165
|
+
margin:-1px!important;
|
166
|
+
overflow:hidden!important;
|
167
|
+
padding:0!important;
|
168
|
+
position: absolute!important;
|
169
|
+
width:1px!important;
|
170
|
+
}
|
171
|
+
.accessibility,
|
172
|
+
.visuallyhidden{
|
173
|
+
@include accessibility;
|
174
|
+
}
|
175
|
+
@if $responsive{
|
176
|
+
@each $state in palm, lap, lap-and-up, portable, desk, desk-wide{
|
177
|
+
@include media-query(#{$state}){
|
178
|
+
.accessibility--#{$state},
|
179
|
+
.visuallyhidden--#{$state}{
|
180
|
+
@include accessibility;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Make elements into inline-block with IE7 fix. Use it only when you need to make a
|
3
|
+
* block level element inline-block. Elements that are inline by default won't need the
|
4
|
+
* IE7 fix.
|
5
|
+
*
|
6
|
+
* Usage @extend %nlineBlockFix;
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
|
10
|
+
%inline_block_fix {
|
11
|
+
display: inline-block;
|
12
|
+
*display: inline;
|
13
|
+
*zoom: 1;
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$inline_block_whitespace_fix
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
%remove_inline_block_whitespace{
|
6
|
+
letter-spacing: -0.31em;
|
7
|
+
word-spacing: -0.43em;
|
8
|
+
}
|
9
|
+
|
10
|
+
%recover_whitespace{
|
11
|
+
letter-spacing:normal;
|
12
|
+
word-spacing:normal;
|
13
|
+
}
|
@@ -0,0 +1,341 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$MIXINS
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Create a fully formed type style (sizing and vertical rhythm) by passing in a
|
6
|
+
* single value, e.g.:
|
7
|
+
*
|
8
|
+
`@include font-size(10px);`
|
9
|
+
*
|
10
|
+
* Thanks to @redclov3r for the `line-height` Sass:
|
11
|
+
* twitter.com/redclov3r/status/250301539321798657
|
12
|
+
*/
|
13
|
+
@mixin font-size($font-size, $line-height:true){
|
14
|
+
font-size:$font-size;
|
15
|
+
font-size:($font-size / $base-font-size)*1rem;
|
16
|
+
@if $line-height == true{
|
17
|
+
line-height:ceil($font-size / $base-line-height) * ($base-line-height / $font-size);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Create a fully formed button style (line height and padding) by passing in a
|
23
|
+
* single value, e.g.:
|
24
|
+
*
|
25
|
+
`@include line-height(3);`
|
26
|
+
*/
|
27
|
+
|
28
|
+
@mixin line-height($line-height){
|
29
|
+
line-height:$line-height;
|
30
|
+
padding-right:(($line-height - 1) / 2 )*1em;
|
31
|
+
padding-left:(($line-height - 1) / 2 )*1em;
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Style any number of headings in one fell swoop, e.g.:
|
37
|
+
*
|
38
|
+
.foo{
|
39
|
+
@include headings(1, 3){
|
40
|
+
color:#BADA55;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
*
|
44
|
+
* With thanks to @lar_zzz, @paranoida, @rowanmanning and ultimately
|
45
|
+
* @thierrylemoulec for refining and improving my initial mixin.
|
46
|
+
*/
|
47
|
+
@mixin headings($from: 1, $to: 6){
|
48
|
+
%base-heading {
|
49
|
+
@content
|
50
|
+
}
|
51
|
+
|
52
|
+
@if $from >= 1 and $to <= 6{
|
53
|
+
@for $i from $from through $to{
|
54
|
+
h#{$i}{
|
55
|
+
@extend %base-heading;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Create vendor-prefixed CSS in one go, e.g.
|
64
|
+
*
|
65
|
+
`@include vendor(border-radius, 4px);`
|
66
|
+
*
|
67
|
+
*/
|
68
|
+
@mixin vendor($property, $value...){
|
69
|
+
-webkit-#{$property}:$value;
|
70
|
+
-moz-#{$property}:$value;
|
71
|
+
-ms-#{$property}:$value;
|
72
|
+
-o-#{$property}:$value;
|
73
|
+
#{$property}:$value;
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Create CSS keyframe animations for all vendors in one go, e.g.:
|
79
|
+
*
|
80
|
+
.foo{
|
81
|
+
@include vendor(animation, shrink 3s);
|
82
|
+
}
|
83
|
+
|
84
|
+
@include keyframe(shrink){
|
85
|
+
from{
|
86
|
+
font-size:5em;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
*
|
90
|
+
* Courtesy of @integralist: twitter.com/integralist/status/260484115315437569
|
91
|
+
*/
|
92
|
+
@mixin keyframe ($animation-name){
|
93
|
+
@-webkit-keyframes $animation-name{
|
94
|
+
@content;
|
95
|
+
}
|
96
|
+
|
97
|
+
@-moz-keyframes $animation-name{
|
98
|
+
@content;
|
99
|
+
}
|
100
|
+
|
101
|
+
@-ms-keyframes $animation-name{
|
102
|
+
@content;
|
103
|
+
}
|
104
|
+
|
105
|
+
@-o-keyframes $animation-name{
|
106
|
+
@content;
|
107
|
+
}
|
108
|
+
|
109
|
+
@keyframes $animation-name{
|
110
|
+
@content;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Force overly long spans of text to truncate, e.g.:
|
117
|
+
*
|
118
|
+
`@include truncate(100%);`
|
119
|
+
*
|
120
|
+
* Where `$truncation-boundary` is a united measurement.
|
121
|
+
*/
|
122
|
+
@mixin truncate($truncation-boundary){
|
123
|
+
max-width:$truncation-boundary;
|
124
|
+
white-space:nowrap;
|
125
|
+
overflow:hidden;
|
126
|
+
text-overflow:ellipsis;
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
/**
|
131
|
+
* CSS arrows!!! But... before you read on, you might want to grab a coffee...
|
132
|
+
*
|
133
|
+
* This mixin creates a CSS arrow on a given element. We can have the arrow
|
134
|
+
* appear in one of 12 locations, thus:
|
135
|
+
*
|
136
|
+
* 01 02 03
|
137
|
+
* +------------------+
|
138
|
+
* 12 | | 04
|
139
|
+
* | |
|
140
|
+
* 11 | | 05
|
141
|
+
* | |
|
142
|
+
* 10 | | 06
|
143
|
+
* +------------------+
|
144
|
+
* 09 08 07
|
145
|
+
*
|
146
|
+
* You pass this position in along with a desired arrow color and optional
|
147
|
+
* border color, for example:
|
148
|
+
*
|
149
|
+
* `@include arrow(top, left, red)`
|
150
|
+
*
|
151
|
+
* for just a single, red arrow, or:
|
152
|
+
*
|
153
|
+
* `@include arrow(bottom, center, red, black)`
|
154
|
+
*
|
155
|
+
* which will create a red triangle with a black border which sits at the bottom
|
156
|
+
* center of the element. Call the mixin thus:
|
157
|
+
*
|
158
|
+
.foo{
|
159
|
+
background-color:#BADA55;
|
160
|
+
border:1px solid #ACE;
|
161
|
+
@include arrow(top, left, #BADA55, #ACE);
|
162
|
+
}
|
163
|
+
*
|
164
|
+
*/
|
165
|
+
@mixin arrow($arrow-edge, $arrow-location, $arrow-color, $border-color: $arrow-color){
|
166
|
+
|
167
|
+
@if $arrow-edge == top{
|
168
|
+
|
169
|
+
@extend %arrow--top;
|
170
|
+
|
171
|
+
&:before{
|
172
|
+
border-bottom-color:$border-color!important;
|
173
|
+
}
|
174
|
+
|
175
|
+
&:after{
|
176
|
+
border-bottom-color:$arrow-color!important;
|
177
|
+
}
|
178
|
+
|
179
|
+
@if $arrow-location == left{
|
180
|
+
@extend %arrow--left;
|
181
|
+
}
|
182
|
+
|
183
|
+
@if $arrow-location == center{
|
184
|
+
@extend %arrow--center;
|
185
|
+
}
|
186
|
+
|
187
|
+
@if $arrow-location == right{
|
188
|
+
@extend %arrow--right;
|
189
|
+
}
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
@if $arrow-edge == right{
|
194
|
+
|
195
|
+
@extend %arrow--far;
|
196
|
+
|
197
|
+
&:before{
|
198
|
+
border-left-color:$border-color!important;
|
199
|
+
}
|
200
|
+
|
201
|
+
&:after{
|
202
|
+
border-left-color:$arrow-color!important;
|
203
|
+
}
|
204
|
+
|
205
|
+
@if $arrow-location == top{
|
206
|
+
@extend %arrow--upper;
|
207
|
+
}
|
208
|
+
|
209
|
+
@if $arrow-location == center{
|
210
|
+
@extend %arrow--middle;
|
211
|
+
}
|
212
|
+
|
213
|
+
@if $arrow-location == bottom{
|
214
|
+
@extend %arrow--lower;
|
215
|
+
}
|
216
|
+
|
217
|
+
}
|
218
|
+
|
219
|
+
@if $arrow-edge == bottom{
|
220
|
+
|
221
|
+
@extend %arrow--bottom;
|
222
|
+
|
223
|
+
&:before{
|
224
|
+
border-top-color:$border-color!important;
|
225
|
+
}
|
226
|
+
|
227
|
+
&:after{
|
228
|
+
border-top-color:$arrow-color!important;
|
229
|
+
}
|
230
|
+
|
231
|
+
@if $arrow-location == left{
|
232
|
+
@extend %arrow--left;
|
233
|
+
}
|
234
|
+
|
235
|
+
@if $arrow-location == center{
|
236
|
+
@extend %arrow--center;
|
237
|
+
}
|
238
|
+
|
239
|
+
@if $arrow-location == right{
|
240
|
+
@extend %arrow--right;
|
241
|
+
}
|
242
|
+
|
243
|
+
}
|
244
|
+
|
245
|
+
@if $arrow-edge == left{
|
246
|
+
|
247
|
+
@extend %arrow--near;
|
248
|
+
|
249
|
+
&:before{
|
250
|
+
border-right-color:$border-color!important;
|
251
|
+
}
|
252
|
+
|
253
|
+
&:after{
|
254
|
+
border-right-color:$arrow-color!important;
|
255
|
+
}
|
256
|
+
|
257
|
+
@if $arrow-location == top{
|
258
|
+
@extend %arrow--upper;
|
259
|
+
}
|
260
|
+
|
261
|
+
@if $arrow-location == center{
|
262
|
+
@extend %arrow--middle;
|
263
|
+
}
|
264
|
+
|
265
|
+
@if $arrow-location == bottom{
|
266
|
+
@extend %arrow--lower;
|
267
|
+
}
|
268
|
+
|
269
|
+
}
|
270
|
+
|
271
|
+
}
|
272
|
+
|
273
|
+
|
274
|
+
/**
|
275
|
+
* Media query mixin.
|
276
|
+
*
|
277
|
+
* It’s not great practice to define solid breakpoints up-front, preferring to
|
278
|
+
* modify your design when it needs it, rather than assuming you’ll want a
|
279
|
+
* change at ‘mobile’. However, as inuit.css is required to take a hands off
|
280
|
+
* approach to design decisions, this is the closest we can get to baked-in
|
281
|
+
* responsiveness. It’s flexible enough to allow you to set your own breakpoints
|
282
|
+
* but solid enough to be frameworkified.
|
283
|
+
*
|
284
|
+
* We define some broad breakpoints in our vars file that are picked up here
|
285
|
+
* for use in a simple media query mixin. Our options are:
|
286
|
+
*
|
287
|
+
* palm
|
288
|
+
* lap
|
289
|
+
* lap-and-up
|
290
|
+
* portable
|
291
|
+
* desk
|
292
|
+
* desk-wide
|
293
|
+
*
|
294
|
+
* Not using a media query will, naturally, serve styles to all devices.
|
295
|
+
*
|
296
|
+
* `@include media-query(palm){ [styles here] }`
|
297
|
+
*
|
298
|
+
* We work out your end points for you:
|
299
|
+
*/
|
300
|
+
$palm-end: $lap-start - 1px;
|
301
|
+
$lap-end: $desk-start - 1px;
|
302
|
+
|
303
|
+
@mixin media-query($media-query){
|
304
|
+
|
305
|
+
@if $media-query == palm{
|
306
|
+
|
307
|
+
@media only screen and (max-width:$palm-end) { @content; }
|
308
|
+
|
309
|
+
}
|
310
|
+
|
311
|
+
@if $media-query == lap{
|
312
|
+
|
313
|
+
@media only screen and (min-width:$lap-start) and (max-width:$lap-end) { @content; }
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
@if $media-query == lap-and-up{
|
318
|
+
|
319
|
+
@media only screen and (min-width:$lap-start) { @content; }
|
320
|
+
|
321
|
+
}
|
322
|
+
|
323
|
+
@if $media-query == portable{
|
324
|
+
|
325
|
+
@media only screen and (max-width:$lap-end) { @content; }
|
326
|
+
|
327
|
+
}
|
328
|
+
|
329
|
+
@if $media-query == desk{
|
330
|
+
|
331
|
+
@media only screen and (min-width:$desk-start) { @content; }
|
332
|
+
|
333
|
+
}
|
334
|
+
|
335
|
+
@if $media-query == desk-wide{
|
336
|
+
|
337
|
+
@media only screen and (min-width: $desk-wide-start) { @content; }
|
338
|
+
|
339
|
+
}
|
340
|
+
|
341
|
+
}
|