compass-inuit 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +71 -0
- data/lib/compass-inuit.rb +3 -0
- data/stylesheets/_compass-inuit.scss +138 -0
- data/stylesheets/partials/_base.scss +14 -0
- data/stylesheets/partials/_generic.scss +13 -0
- data/stylesheets/partials/_objects.scss +20 -0
- data/stylesheets/partials/base/_code.scss +61 -0
- data/stylesheets/partials/base/_forms.scss +141 -0
- data/stylesheets/partials/base/_headings.scss +58 -0
- data/stylesheets/partials/base/_images.scss +10 -0
- data/stylesheets/partials/base/_links.scss +32 -0
- data/stylesheets/partials/base/_lists.scss +10 -0
- data/stylesheets/partials/base/_main.scss +7 -0
- data/stylesheets/partials/base/_paragraphs.scss +11 -0
- data/stylesheets/partials/base/_quotes.scss +45 -0
- data/stylesheets/partials/base/_smallprint.scss +21 -0
- data/stylesheets/partials/base/_tables.scss +150 -0
- data/stylesheets/partials/generic/_brand.scss +18 -0
- data/stylesheets/partials/generic/_clearfix.scss +19 -0
- data/stylesheets/partials/generic/_helper.scss +69 -0
- data/stylesheets/partials/generic/_mixins.scss +31 -0
- data/stylesheets/partials/generic/_reset.scss +75 -0
- data/stylesheets/partials/generic/_shared.scss +50 -0
- data/stylesheets/partials/objects/_block-list.scss +36 -0
- data/stylesheets/partials/objects/_buttons.scss +41 -0
- data/stylesheets/partials/objects/_columns.scss +22 -0
- data/stylesheets/partials/objects/_complex-link.scss +28 -0
- data/stylesheets/partials/objects/_flexbox.scss +39 -0
- data/stylesheets/partials/objects/_flyout.scss +57 -0
- data/stylesheets/partials/objects/_grids.scss +154 -0
- data/stylesheets/partials/objects/_icon-text.scss +36 -0
- data/stylesheets/partials/objects/_island.scss +33 -0
- data/stylesheets/partials/objects/_lozenges.scss +35 -0
- data/stylesheets/partials/objects/_matrix.scss +90 -0
- data/stylesheets/partials/objects/_media.scss +55 -0
- data/stylesheets/partials/objects/_nav.scss +62 -0
- data/stylesheets/partials/objects/_pagination.scss +39 -0
- data/stylesheets/partials/objects/_split.scss +35 -0
- data/stylesheets/partials/objects/_sprite.scss +62 -0
- data/stylesheets/partials/objects/_this-or-this.scss +33 -0
- data/templates/project/_vars.scss +38 -0
- data/templates/project/manifest.rb +3 -0
- data/templates/project/your-project.scss +16 -0
- metadata +50 -9
@@ -0,0 +1,36 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$ICON-TEXT
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* For text-links etc that have an icon with them. Sometimes whitespace would
|
6
|
+
* suffice in creating a gap between the icon and text, for example:
|
7
|
+
*
|
8
|
+
<a href=#>
|
9
|
+
<i class="s s--help"></i> Help & support
|
10
|
+
</a>
|
11
|
+
*
|
12
|
+
* However we will sometimes want a larger, explicity set gap:
|
13
|
+
<a href=# class=icon-text>
|
14
|
+
<i class="icon-text__icon s s--help"></i>Help & support
|
15
|
+
</a>
|
16
|
+
*
|
17
|
+
*
|
18
|
+
* Demo: jsfiddle.net/inuitcss/Q6Lbf
|
19
|
+
*
|
20
|
+
*/
|
21
|
+
.icon-text > .icon-text__icon{
|
22
|
+
margin-right:8px;
|
23
|
+
}
|
24
|
+
|
25
|
+
/**
|
26
|
+
* We can also reverse the direction of the margin for icons that appear to the
|
27
|
+
* right of the text content, thus:
|
28
|
+
*
|
29
|
+
<a href=# class=icon-text--rev>
|
30
|
+
Help & support<i class="icon-text__icon s s--help"></i>
|
31
|
+
</a>
|
32
|
+
*
|
33
|
+
*/
|
34
|
+
.icon-text--rev > .icon-text__icon{
|
35
|
+
margin-left:8px;
|
36
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$ISLAND
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Simple, boxed off content, as per: csswizardry.com/2011/10/the-island-object
|
6
|
+
* E.g.:
|
7
|
+
*
|
8
|
+
<div class=island>
|
9
|
+
I am boxed off.
|
10
|
+
</div>
|
11
|
+
*
|
12
|
+
* Demo: jsfiddle.net/inuitcss/u8pV3
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
.island,
|
16
|
+
.islet{
|
17
|
+
display:block;
|
18
|
+
@extend .cf;
|
19
|
+
}
|
20
|
+
.island{
|
21
|
+
padding:$base-spacing-unit +px;
|
22
|
+
}
|
23
|
+
.island > :last-child,
|
24
|
+
.islet > :last-child{
|
25
|
+
margin-bottom:0;
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Just like `.island`, only smaller.
|
30
|
+
*/
|
31
|
+
.islet{
|
32
|
+
padding:$half-spacing-unit +px;
|
33
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$LOZENGES
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Create pill-like runs of text, e.g.:
|
6
|
+
*
|
7
|
+
<p>This <span class=loz>here</span> is a lozenge!</p>
|
8
|
+
*
|
9
|
+
<h1>This <span class=loz>here</span> is also a lozenge!</h1>
|
10
|
+
*
|
11
|
+
* Demo: jsfiddle.net/inuitcss/N3pGm
|
12
|
+
*
|
13
|
+
*/
|
14
|
+
.loz{
|
15
|
+
display:inline-block;
|
16
|
+
/**
|
17
|
+
* These numbers set in ems mean that, at its narrowest, a lozenge will be
|
18
|
+
* the same width as the 1.5 `line-height` set on the `html` element.
|
19
|
+
* This allows us to use the `.loz` in any `font-size` we wish.
|
20
|
+
*/
|
21
|
+
min-width: 1.00em;
|
22
|
+
padding-right:0.25em;
|
23
|
+
padding-left: 0.25em;
|
24
|
+
/* =1.50em */
|
25
|
+
text-align:center;
|
26
|
+
background-color:#ccc; /* Override this color in your theme stylesheet */
|
27
|
+
color:#fff; /* Override this color in your theme stylesheet */
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Normally we’d use border-radius:100%; but instead here we just use an
|
31
|
+
* overly large number; `border-radius:100%;` would create an oval on
|
32
|
+
* non-square elements whereas we just want to round the ends of an element.
|
33
|
+
*/
|
34
|
+
@include vendor(border-radius, 100px);
|
35
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$MATRIX
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Create a grid of items out of a single list, e.g.:
|
6
|
+
*
|
7
|
+
<ul class="matrix three-cols">
|
8
|
+
<li class=all-cols>Lorem</li>
|
9
|
+
<li>Ipsum <a href=#>dolor</a></li>
|
10
|
+
<li><a href=# class=matrix__link>Sit</a></li>
|
11
|
+
<li>Amet</li>
|
12
|
+
<li class=all-cols>Consectetuer</li>
|
13
|
+
</ul>
|
14
|
+
*
|
15
|
+
* Extend this object in your theme stylesheet.
|
16
|
+
*
|
17
|
+
* Demo: jsfiddle.net/inuitcss/Y2zrU
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
.matrix,
|
21
|
+
.matrix > li{
|
22
|
+
border:0 solid #ccc; /* Override this color in your theme stylesheet */
|
23
|
+
}
|
24
|
+
.matrix{
|
25
|
+
list-style:none;
|
26
|
+
margin-left:0;
|
27
|
+
border-top-width: 1px;
|
28
|
+
border-left-width:1px;
|
29
|
+
@extend .cf;
|
30
|
+
}
|
31
|
+
.matrix > li{
|
32
|
+
padding:$half-spacing-unit +px;
|
33
|
+
float:left;
|
34
|
+
border-right-width: 1px;
|
35
|
+
border-bottom-width:1px;
|
36
|
+
@include vendor(box-sizing, border-box);
|
37
|
+
}
|
38
|
+
.matrix__link{
|
39
|
+
display:block;
|
40
|
+
padding:$half-spacing-unit +px;
|
41
|
+
margin:-$half-spacing-unit +px;
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The `.multi-list` object is a lot like the `.matrix` object only without the
|
46
|
+
* blocky borders and padding.
|
47
|
+
*
|
48
|
+
<ul class="multi-list four-cols">
|
49
|
+
<li>Lorem</li>
|
50
|
+
<li>Ipsum</li>
|
51
|
+
<li>Dolor</li>
|
52
|
+
<li>Sit</li>
|
53
|
+
</ul>
|
54
|
+
*
|
55
|
+
* Demo: jsfiddle.net/inuitcss/Y2zrU
|
56
|
+
*
|
57
|
+
*/
|
58
|
+
.multi-list{
|
59
|
+
list-style:none;
|
60
|
+
margin-left:0;
|
61
|
+
@extend .cf;
|
62
|
+
}
|
63
|
+
.multi-list > li{
|
64
|
+
float:left;
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Apply these classes alongside the `.matrix` or `.multi-list` classes on
|
69
|
+
* lists to determine how wide their columns are.
|
70
|
+
*/
|
71
|
+
.two-cols > li{
|
72
|
+
width:50%;
|
73
|
+
}
|
74
|
+
.three-cols > li{
|
75
|
+
width:33.333%;
|
76
|
+
}
|
77
|
+
.four-cols > li{
|
78
|
+
width:25%;
|
79
|
+
}
|
80
|
+
.five-cols > li{
|
81
|
+
width:20%;
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* Unfortunately we have to qualify this selector in order to bring its
|
85
|
+
* specificity above the `.[number]-cols > li` selectors above.
|
86
|
+
*/
|
87
|
+
.matrix > .all-cols,
|
88
|
+
.multi-list > .all-cols{
|
89
|
+
width:100%;
|
90
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$MEDIA
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Place any image- and text-like content side-by-side, as per:
|
6
|
+
* stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code
|
7
|
+
* E.g.:
|
8
|
+
*
|
9
|
+
<div class=media>
|
10
|
+
<img src=http://placekitten.com/200/300 alt="" class=media__img>
|
11
|
+
<p class=media__body>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
|
12
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
13
|
+
</div>
|
14
|
+
*
|
15
|
+
* Demo: jsfiddle.net/inuitcss/cf4Qs
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
.media{
|
19
|
+
display:block;
|
20
|
+
@extend .cf;
|
21
|
+
}
|
22
|
+
.media__img{
|
23
|
+
float:left;
|
24
|
+
margin-right:$base-spacing-unit +px;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Reversed image location (right instead of left).
|
28
|
+
*/
|
29
|
+
.media__img--rev{
|
30
|
+
float:right;
|
31
|
+
margin-left:$base-spacing-unit +px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.media__img img,
|
35
|
+
.media__img--rev img{
|
36
|
+
display:block;
|
37
|
+
}
|
38
|
+
|
39
|
+
.media__body{
|
40
|
+
overflow:hidden;
|
41
|
+
}
|
42
|
+
.media__body,
|
43
|
+
.media__body > :last-child{
|
44
|
+
margin-bottom:0;
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* `.img`s in `.islet`s need an appropriately sized margin.
|
49
|
+
*/
|
50
|
+
.islet .media__img{
|
51
|
+
margin-right:$half-spacing-unit +px;
|
52
|
+
}
|
53
|
+
.islet .media__img--rev{
|
54
|
+
margin-left:$half-spacing-unit +px;
|
55
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$NAV
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Nav abstraction as per: csswizardry.com/2011/09/the-nav-abstraction
|
6
|
+
* When used on an `ol` or `ul`, this class throws the list into horizontal mode
|
7
|
+
* e.g.:
|
8
|
+
*
|
9
|
+
<ul class=nav>
|
10
|
+
<li><a href=#>Home</a></li>
|
11
|
+
<li><a href=#>About</a></li>
|
12
|
+
<li><a href=#>Portfolio</a></li>
|
13
|
+
<li><a href=#>Contact</a></li>
|
14
|
+
</ul>
|
15
|
+
*
|
16
|
+
* Demo: jsfiddle.net/inuitcss/Vnph4
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
.nav{
|
20
|
+
list-style:none;
|
21
|
+
margin-left:0;
|
22
|
+
@extend .cf;
|
23
|
+
}
|
24
|
+
.nav > li,
|
25
|
+
.nav > li > a{
|
26
|
+
display:inline-block;
|
27
|
+
*display:inline;
|
28
|
+
zoom:1;
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* `.stacked` extends `.nav` and throws the list into vertical mode, e.g.:
|
33
|
+
*
|
34
|
+
<ul class="nav nav--stacked">
|
35
|
+
<li><a href=#>Home</a></li>
|
36
|
+
<li><a href=#>About</a></li>
|
37
|
+
<li><a href=#>Portfolio</a></li>
|
38
|
+
<li><a href=#>Contact</a></li>
|
39
|
+
</ul>
|
40
|
+
*
|
41
|
+
*/
|
42
|
+
.nav--stacked > li{
|
43
|
+
display:list-item;
|
44
|
+
}
|
45
|
+
.nav--stacked > li > a{
|
46
|
+
display:block;
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* `.banner-nav` extends `.nav` and centres the list, e.g.:
|
51
|
+
*
|
52
|
+
<ul class="nav nav--banner">
|
53
|
+
<li><a href=#>Home</a></li>
|
54
|
+
<li><a href=#>About</a></li>
|
55
|
+
<li><a href=#>Portfolio</a></li>
|
56
|
+
<li><a href=#>Contact</a></li>
|
57
|
+
</ul>
|
58
|
+
*
|
59
|
+
*/
|
60
|
+
.nav--banner{
|
61
|
+
text-align:center;
|
62
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$PAGINATION
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Basic pagination object, extends `.nav`.
|
6
|
+
* Requires some funky commenting to collapse any white-space caused by the
|
7
|
+
* `display:inline-block;` rules.
|
8
|
+
*
|
9
|
+
<ol class="nav pagination">
|
10
|
+
<li class=pagination__first>First</li><!--
|
11
|
+
--><li class=pagination__prev>Previous</li><!--
|
12
|
+
--><li><a href=/page/1>1</a></li><!--
|
13
|
+
--><li><a href=/page/2>2</a></li><!--
|
14
|
+
--><li class=current><a href=/page/3>3</a></li><!--
|
15
|
+
--><li><a href=/page/4>4</a></li><!--
|
16
|
+
--><li><a href=/page/5>5</a></li><!--
|
17
|
+
--><li class=pagination__next><a href=/page/next>Next</a></li><!--
|
18
|
+
--><li class=pagination__last><a href=/page/last>Last</a></li>
|
19
|
+
</ol>
|
20
|
+
*
|
21
|
+
* Demo: jsfiddle.net/inuitcss/9Y6PU
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
.pagination{
|
25
|
+
text-align:center;
|
26
|
+
}
|
27
|
+
.pagination > li{
|
28
|
+
padding:($base-spacing-unit / 2) +px;
|
29
|
+
}
|
30
|
+
.pagination > li > a{
|
31
|
+
padding:($base-spacing-unit / 2) +px;
|
32
|
+
margin:-($base-spacing-unit / 2) +px;
|
33
|
+
}
|
34
|
+
.pagination__first a:before{
|
35
|
+
content:"« ";
|
36
|
+
}
|
37
|
+
.pagination__last a:after{
|
38
|
+
content:" »";
|
39
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$SPLIT
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Simple split item for creating two elements floated away from one another,
|
6
|
+
* e.g.:
|
7
|
+
*
|
8
|
+
<dl class=split>
|
9
|
+
<dt class=split__title>Burger and fries</dt>
|
10
|
+
<dd>£5.99</dd>
|
11
|
+
<dt class=split__title>Fillet steak</dt>
|
12
|
+
<dd>£19.99</dd>
|
13
|
+
<dt class=split__title>Ice cream</dt>
|
14
|
+
<dd>£2.99</dd>
|
15
|
+
</dl>
|
16
|
+
*
|
17
|
+
<ol class="split results">
|
18
|
+
<li class=first><b class=split__title>1st place</b> Bob</li>
|
19
|
+
<li class=second><b class=split__title>2nd place</b> Lilly</li>
|
20
|
+
<li class=third><b class=split__title>3rd place</b> Ted</li>
|
21
|
+
</ol>
|
22
|
+
*
|
23
|
+
* Demo: jsfiddle.net/inuitcss/9gZW7
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
.split{
|
27
|
+
text-align:right;
|
28
|
+
list-style:none;
|
29
|
+
margin-left:0;
|
30
|
+
}
|
31
|
+
.split__title{
|
32
|
+
text-align:left;
|
33
|
+
float:left;
|
34
|
+
clear:left;
|
35
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
$SPRITE
|
3
|
+
\*------------------------------------*/
|
4
|
+
/**
|
5
|
+
* Giving an element a class of `.s` will throw it into ‘sprite’ mode and apply
|
6
|
+
* a background image e.g.:
|
7
|
+
*
|
8
|
+
<a class="s s--question-mark">More info…</a>
|
9
|
+
*
|
10
|
+
* or
|
11
|
+
*
|
12
|
+
<a href=#><i class="s s--question-mark"></i> Help and FAQ</a>
|
13
|
+
*
|
14
|
+
* Giving an element a class of `.i` will throw it into ‘icon’ mode and will
|
15
|
+
* not add a background, but should be used for icon fonts, e.g.:
|
16
|
+
*
|
17
|
+
<a href=# class="i i--star">Add to favorites</a>
|
18
|
+
*
|
19
|
+
* or
|
20
|
+
*
|
21
|
+
<a href=#><i class="i i--star"></i> View your favourites</a>
|
22
|
+
*
|
23
|
+
* These all require extension in your theme stylesheet.
|
24
|
+
*
|
25
|
+
* Demo: jsfiddle.net/inuitcss/6TKuS
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
.s,
|
29
|
+
.i{
|
30
|
+
display:inline-block;
|
31
|
+
/**
|
32
|
+
* The typical size of most icons. Override in your theme stylesheet.
|
33
|
+
*/
|
34
|
+
width: 16px;
|
35
|
+
height:16px;
|
36
|
+
position:relative;
|
37
|
+
zoom:1;
|
38
|
+
/**
|
39
|
+
* So using `.i` on `i` elements doesn’t make a visual difference.
|
40
|
+
*/
|
41
|
+
font-style:normal;
|
42
|
+
/**
|
43
|
+
* So icons added using `.i` sit in the centre of the element.
|
44
|
+
*/
|
45
|
+
text-align:center;
|
46
|
+
}
|
47
|
+
.s{
|
48
|
+
background-image:url(/path/to/your/sprite.png);
|
49
|
+
vertical-align:middle;
|
50
|
+
top:-1px;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Kellum Method image replacement:
|
54
|
+
* zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement
|
55
|
+
*/
|
56
|
+
text-indent:100%;
|
57
|
+
white-space:nowrap;
|
58
|
+
overflow:hidden;
|
59
|
+
}
|
60
|
+
.i{
|
61
|
+
vertical-align:top;
|
62
|
+
}
|