compass-blueprint 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/compass-blueprint.gemspec +18 -0
- data/framework/blueprint/stylesheets/_blueprint.scss +37 -0
- data/framework/blueprint/stylesheets/blueprint/_buttons.scss +101 -0
- data/framework/blueprint/stylesheets/blueprint/_colors.scss +36 -0
- data/framework/blueprint/stylesheets/blueprint/_debug.scss +28 -0
- data/framework/blueprint/stylesheets/blueprint/_fancy-type.scss +88 -0
- data/framework/blueprint/stylesheets/blueprint/_form.scss +66 -0
- data/framework/blueprint/stylesheets/blueprint/_grid.scss +258 -0
- data/framework/blueprint/stylesheets/blueprint/_ie.scss +111 -0
- data/framework/blueprint/stylesheets/blueprint/_interaction.scss +66 -0
- data/framework/blueprint/stylesheets/blueprint/_link-icons.scss +37 -0
- data/framework/blueprint/stylesheets/blueprint/_liquid.scss +152 -0
- data/framework/blueprint/stylesheets/blueprint/_print.scss +86 -0
- data/framework/blueprint/stylesheets/blueprint/_reset.scss +3 -0
- data/framework/blueprint/stylesheets/blueprint/_rtl.scss +121 -0
- data/framework/blueprint/stylesheets/blueprint/_scaffolding.scss +52 -0
- data/framework/blueprint/stylesheets/blueprint/_typography.scss +90 -0
- data/framework/blueprint/stylesheets/blueprint/_utilities.scss +37 -0
- data/framework/blueprint/stylesheets/blueprint/reset/_utilities.scss +80 -0
- data/framework/blueprint/templates/basic/grid.png +0 -0
- data/framework/blueprint/templates/basic/ie.sass +4 -0
- data/framework/blueprint/templates/basic/manifest.rb +30 -0
- data/framework/blueprint/templates/basic/partials/_base.sass +10 -0
- data/framework/blueprint/templates/basic/print.sass +4 -0
- data/framework/blueprint/templates/basic/screen.sass +12 -0
- data/framework/blueprint/templates/buttons/buttons.sass +49 -0
- data/framework/blueprint/templates/buttons/buttons/cross.png +0 -0
- data/framework/blueprint/templates/buttons/buttons/key.png +0 -0
- data/framework/blueprint/templates/buttons/buttons/tick.png +0 -0
- data/framework/blueprint/templates/buttons/manifest.rb +17 -0
- data/framework/blueprint/templates/link_icons/link_icons.sass +13 -0
- data/framework/blueprint/templates/link_icons/link_icons/doc.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/email.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/external.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/feed.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/im.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/visited.png +0 -0
- data/framework/blueprint/templates/link_icons/link_icons/xls.png +0 -0
- data/framework/blueprint/templates/link_icons/manifest.rb +23 -0
- data/framework/blueprint/templates/project/grid.png +0 -0
- data/framework/blueprint/templates/project/ie.sass +16 -0
- data/framework/blueprint/templates/project/manifest.rb +30 -0
- data/framework/blueprint/templates/project/partials/_base.sass +11 -0
- data/framework/blueprint/templates/project/print.sass +8 -0
- data/framework/blueprint/templates/project/screen.sass +46 -0
- data/framework/blueprint/templates/semantic/grid.png +0 -0
- data/framework/blueprint/templates/semantic/ie.sass +16 -0
- data/framework/blueprint/templates/semantic/manifest.rb +33 -0
- data/framework/blueprint/templates/semantic/partials/_base.sass +10 -0
- data/framework/blueprint/templates/semantic/partials/_form.sass +6 -0
- data/framework/blueprint/templates/semantic/partials/_page.sass +17 -0
- data/framework/blueprint/templates/semantic/partials/_two_col.sass +38 -0
- data/framework/blueprint/templates/semantic/print.sass +5 -0
- data/framework/blueprint/templates/semantic/screen.sass +14 -0
- data/lib/compass-blueprint.rb +4 -0
- data/lib/compass-blueprint/version.rb +5 -0
- metadata +119 -0
@@ -0,0 +1,152 @@
|
|
1
|
+
// --------------------------------------------------------------
|
2
|
+
// SASS Gridification
|
3
|
+
// * Author: Geoff Garside
|
4
|
+
// A SASS adaptation of Blueprint CSS
|
5
|
+
// * Version: 0.7.1 (2008-02-25)
|
6
|
+
// * Website: http://code.google.com/p/blueprintcss/
|
7
|
+
// Based on work by:
|
8
|
+
// * Chris Eppstein [eppsteins.net]
|
9
|
+
// * Lorin Tacket [lorintackett.com]
|
10
|
+
// * Olav Bjorkoy [bjorkoy.com]
|
11
|
+
// * Nathan Borror [playgroundblues.com]
|
12
|
+
// * Jeff Croft [jeffcroft.com]
|
13
|
+
// * Christian Metts [mintchaos.com]
|
14
|
+
// * Khoi Vinh [subtraction.com]
|
15
|
+
// Liquid grid work by:
|
16
|
+
// * Ben Listwon
|
17
|
+
// * David Bedingfield
|
18
|
+
// * Andrei Michael Herasimchuk
|
19
|
+
// Involution Studios, http://www.involutionstudios.com
|
20
|
+
// Read more about using a grid here:
|
21
|
+
// * subtraction.com/archives/2007/0318-oh-yeeaahh.php
|
22
|
+
// -----
|
23
|
+
// By default, the grid is 80% of window width, with 24 columns.
|
24
|
+
//
|
25
|
+
// To make the grid fixed, simply change the .container width
|
26
|
+
// property to a pixel value. e.g., 960px.
|
27
|
+
// -----
|
28
|
+
// To use:
|
29
|
+
// This module is a REPLACEMENT for the grid module. Simply import it:
|
30
|
+
// @import blueprint
|
31
|
+
// @import blueprint/liquid
|
32
|
+
// -------------------------------------------------------------------
|
33
|
+
|
34
|
+
@import "compass/utilities/general/clearfix";
|
35
|
+
@import "compass/utilities/general/float";
|
36
|
+
|
37
|
+
// Main layout grid, override these constants to build your grid and container sizes.
|
38
|
+
// The width shown gives the right floored percentage values.
|
39
|
+
$blueprint-liquid-grid-columns: 24 !default;
|
40
|
+
|
41
|
+
$blueprint-liquid-grid-width: 3.167% !default;
|
42
|
+
|
43
|
+
$blueprint-liquid-grid-margin: 1.042% !default;
|
44
|
+
|
45
|
+
// Do not edit below this line unless you really know what you're doing.
|
46
|
+
$blueprint-liquid-container-width: 80% !default;
|
47
|
+
|
48
|
+
$blueprint-liquid-container-min-width: 950px !default;
|
49
|
+
|
50
|
+
$blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-liquid-grid-width) !default;
|
51
|
+
|
52
|
+
@mixin blueprint-liquid-grid {
|
53
|
+
// A container should group all your columns
|
54
|
+
.container {
|
55
|
+
@include container; }
|
56
|
+
// Use these classes (or mixins) to set the width of a column.
|
57
|
+
@for $n from 1 to $blueprint-liquid-grid-columns + 1 {
|
58
|
+
.span-#{$n} { width: span-fluid($n); }
|
59
|
+
div {
|
60
|
+
&.span-#{$n} {
|
61
|
+
@include column($n, $n == $blueprint-liquid-grid-columns); } } }
|
62
|
+
// The last column in a row needs this class (or mixin) or it will end up on the next row.
|
63
|
+
div.last {
|
64
|
+
@include last; }
|
65
|
+
// Add these to a column to append empty cols.
|
66
|
+
@for $n from 1 to $blueprint-liquid-grid-columns {
|
67
|
+
.append-#{$n} {
|
68
|
+
@include append($n); } }
|
69
|
+
// Add these to a column to prepend empty cols.
|
70
|
+
@for $n from 1 to $blueprint-liquid-grid-columns {
|
71
|
+
.prepend-#{$n} {
|
72
|
+
@include prepend($n); } }
|
73
|
+
// Use these classes on an element to push it into the
|
74
|
+
// next column, or to pull it into the previous column.
|
75
|
+
@for $n from 1 to $blueprint-liquid-grid-columns + 1 {
|
76
|
+
.pull-#{$n} {
|
77
|
+
@include pull($n); } }
|
78
|
+
@for $n from 1 to $blueprint-liquid-grid-columns + 1 {
|
79
|
+
.push-#{$n} {
|
80
|
+
@include push($n); } } }
|
81
|
+
|
82
|
+
@mixin container {
|
83
|
+
min-width: $blueprint-liquid-container-min-width;
|
84
|
+
width: $blueprint-liquid-container-width;
|
85
|
+
margin: 0 auto;
|
86
|
+
@include clearfix; }
|
87
|
+
|
88
|
+
// Return the width of `$n` columns in percents.
|
89
|
+
@function span-fluid($n) {
|
90
|
+
@return $blueprint-liquid-grid-width * $n + $blueprint-liquid-grid-margin * ($n - 1);
|
91
|
+
}
|
92
|
+
|
93
|
+
@mixin span($n, $important: false) {
|
94
|
+
@warn "The span mixin is deprecated. Please use the span-fluid function instead. E.g. width: span-fluid(#{$n})";
|
95
|
+
$width: span-fluid($n);
|
96
|
+
@if $important {
|
97
|
+
width: $width !important; }
|
98
|
+
@else {
|
99
|
+
width: $width; } }
|
100
|
+
|
101
|
+
@mixin last {
|
102
|
+
margin-right: 0; }
|
103
|
+
|
104
|
+
@mixin column($n, $last: false) {
|
105
|
+
@include float-left;
|
106
|
+
overflow: hidden;
|
107
|
+
width: span-fluid($n);
|
108
|
+
@if $last {
|
109
|
+
@include last; }
|
110
|
+
@else {
|
111
|
+
margin-right: $blueprint-liquid-grid-margin; } }
|
112
|
+
|
113
|
+
@mixin append($n) {
|
114
|
+
padding-right: ($blueprint-liquid-grid-width + $blueprint-liquid-grid-margin) * $n; }
|
115
|
+
|
116
|
+
@mixin prepend($n) {
|
117
|
+
padding-left: ($blueprint-liquid-grid-width + $blueprint-liquid-grid-margin) * $n; }
|
118
|
+
|
119
|
+
@mixin pull($n, $last: false) {
|
120
|
+
margin-left: $blueprint-liquid-grid-push-pull * $n; }
|
121
|
+
|
122
|
+
@mixin push($n) {
|
123
|
+
@include float-right;
|
124
|
+
margin: {
|
125
|
+
top: 0;
|
126
|
+
left: $blueprint-liquid-grid-margin;
|
127
|
+
right: $blueprint-liquid-grid-push-pull * $n;
|
128
|
+
bottom: 0; }; }
|
129
|
+
|
130
|
+
@mixin border {
|
131
|
+
border-right: 1px solid #eeeeee; }
|
132
|
+
|
133
|
+
@mixin colborder {
|
134
|
+
padding-right: $blueprint-liquid-grid-margin * 2;
|
135
|
+
margin-right: $blueprint-liquid-grid-margin * 2;
|
136
|
+
@include border; }
|
137
|
+
|
138
|
+
@mixin colruler {
|
139
|
+
background: #dddddd;
|
140
|
+
color: #dddddd;
|
141
|
+
clear: both;
|
142
|
+
width: 100%;
|
143
|
+
height: 0.083em;
|
144
|
+
margin: 0;
|
145
|
+
margin-left: $blueprint-liquid-grid-margin * 2;
|
146
|
+
margin-right: $blueprint-liquid-grid-margin * 2;
|
147
|
+
border: none; }
|
148
|
+
|
149
|
+
@mixin colspacer {
|
150
|
+
@include colruler;
|
151
|
+
background: white;
|
152
|
+
color: white; }
|
@@ -0,0 +1,86 @@
|
|
1
|
+
@import "typography";
|
2
|
+
@import "compass/utilities/general/float";
|
3
|
+
|
4
|
+
// Usage examples:
|
5
|
+
// As a top-level mixin, apply to any page that includes the stylesheet:
|
6
|
+
// <pre class="source-code sass">
|
7
|
+
// +blueprint-print
|
8
|
+
// </pre>
|
9
|
+
// Scoped by a presentational class:
|
10
|
+
// <pre class="source-code sass">
|
11
|
+
// body.blueprint
|
12
|
+
// +blueprint-print(true)
|
13
|
+
// </pre>
|
14
|
+
// Scoped by semantic selectors:
|
15
|
+
// <pre class="source-code sass">
|
16
|
+
// body#page-1, body#page-2, body.a-special-page-type
|
17
|
+
// +blueprint-print(true)
|
18
|
+
// </pre>
|
19
|
+
@mixin blueprint-print($nested: false) {
|
20
|
+
@if $nested {
|
21
|
+
@include blueprint-print-body;
|
22
|
+
@include blueprint-print-defaults;
|
23
|
+
} @else {
|
24
|
+
body { @include blueprint-print-body; }
|
25
|
+
@include blueprint-print-defaults;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
// This style is in blueprint, but it can be annoying and
|
30
|
+
// it doesn't work in all browsers.
|
31
|
+
// Feel free to mix it into anchors where you want it.
|
32
|
+
@mixin blueprint-show-link-urls {
|
33
|
+
&:after {
|
34
|
+
content: " (" attr(href) ")";
|
35
|
+
font-size: 90%; } }
|
36
|
+
|
37
|
+
@mixin blueprint-print-body {
|
38
|
+
line-height: 1.5;
|
39
|
+
font-family: $blueprint-font-family;
|
40
|
+
color: black;
|
41
|
+
background: none;
|
42
|
+
font-size: 10pt; }
|
43
|
+
|
44
|
+
@mixin blueprint-print-defaults {
|
45
|
+
.container {
|
46
|
+
background: none; }
|
47
|
+
hr {
|
48
|
+
background: #cccccc;
|
49
|
+
color: #cccccc;
|
50
|
+
width: 100%;
|
51
|
+
height: 2px;
|
52
|
+
margin: 2em 0;
|
53
|
+
padding: 0;
|
54
|
+
border: none;
|
55
|
+
&.space {
|
56
|
+
background: white;
|
57
|
+
color: white; } }
|
58
|
+
h1, h2, h3, h4, h5, h6 {
|
59
|
+
font-family: $blueprint-font-family; }
|
60
|
+
code {
|
61
|
+
font: {
|
62
|
+
size: 0.9em;
|
63
|
+
family: $blueprint-fixed-font-family; }; }
|
64
|
+
a {
|
65
|
+
img {
|
66
|
+
border: none; }
|
67
|
+
&:link,
|
68
|
+
&:visited {
|
69
|
+
background: transparent;
|
70
|
+
font-weight: 700;
|
71
|
+
text-decoration: underline; } }
|
72
|
+
p img.top {
|
73
|
+
margin-top: 0; }
|
74
|
+
blockquote {
|
75
|
+
margin: 1.5em;
|
76
|
+
padding: 1em;
|
77
|
+
font-style: italic;
|
78
|
+
font-size: 0.9em; }
|
79
|
+
.small {
|
80
|
+
font-size: 0.9em; }
|
81
|
+
.large {
|
82
|
+
font-size: 1.1em; }
|
83
|
+
.quiet {
|
84
|
+
color: #999999; }
|
85
|
+
.hide {
|
86
|
+
display: none; } }
|
@@ -0,0 +1,121 @@
|
|
1
|
+
@import "grid";
|
2
|
+
@import "compass/utilities/general/float";
|
3
|
+
|
4
|
+
// Main layout grid, override these constants to build your grid and container sizes.
|
5
|
+
$blueprint-grid-columns: 24 !default;
|
6
|
+
|
7
|
+
$blueprint-grid-width: 30px !default;
|
8
|
+
|
9
|
+
$blueprint-grid-margin: 10px !default;
|
10
|
+
|
11
|
+
$blueprint-grid-outer-width: $blueprint-grid-width + $blueprint-grid-margin;
|
12
|
+
|
13
|
+
$blueprint-container-size: $blueprint-grid-outer-width * $blueprint-grid-columns - $blueprint-grid-margin;
|
14
|
+
|
15
|
+
// Columns
|
16
|
+
// Note: If you use this mixin without the class and want to support ie6
|
17
|
+
// you must set text-align left on your container element in an IE stylesheet.
|
18
|
+
@mixin container {
|
19
|
+
width: $blueprint-container-size;
|
20
|
+
margin: 0 auto;
|
21
|
+
direction: rtl;
|
22
|
+
@include clearfix; }
|
23
|
+
|
24
|
+
// The last column in a row needs this mixin or it will end up on the next row.
|
25
|
+
// TODO add this to span mixin when we have optional arguments
|
26
|
+
@mixin last {
|
27
|
+
margin-left: 0; }
|
28
|
+
|
29
|
+
@mixin column-base($last: false) {
|
30
|
+
@include float-right;
|
31
|
+
@if $last {
|
32
|
+
@include last; }
|
33
|
+
@else {
|
34
|
+
margin-left: $blueprint-grid-margin; }
|
35
|
+
text-align: right;
|
36
|
+
* html & {
|
37
|
+
overflow-x: hidden; } }
|
38
|
+
|
39
|
+
// Mixin to a column to append n empty cols.
|
40
|
+
@mixin append($n) {
|
41
|
+
padding-left: $blueprint-grid-outer-width * $n; }
|
42
|
+
|
43
|
+
// Mixin to a column to prepend n empty cols.
|
44
|
+
@mixin prepend($n) {
|
45
|
+
padding-right: $blueprint-grid-outer-width * $n; }
|
46
|
+
|
47
|
+
// mixin to a column to move it n columns to the left
|
48
|
+
@mixin pull($n, $last: false) {
|
49
|
+
position: relative;
|
50
|
+
@if $last {
|
51
|
+
margin-right: -$blueprint-grid-outer-width * $n + $blueprint-grid-margin; }
|
52
|
+
@else {
|
53
|
+
margin-right: -$blueprint-grid-outer-width * $n; } }
|
54
|
+
|
55
|
+
// mixin to a column to push it n columns to the right
|
56
|
+
@mixin push($n) {
|
57
|
+
@include float-right;
|
58
|
+
position: relative;
|
59
|
+
margin: {
|
60
|
+
top: 0;
|
61
|
+
left: -$blueprint-grid-outer-width * $n;
|
62
|
+
bottom: 1.5em;
|
63
|
+
right: $blueprint-grid-outer-width * $n; }; }
|
64
|
+
|
65
|
+
// Border on left hand side of a column.
|
66
|
+
@mixin border {
|
67
|
+
padding-left: $blueprint-grid-margin / 2 - 1;
|
68
|
+
margin-left: $blueprint-grid-margin / 2;
|
69
|
+
border-left: 1px solid #eeeeee; }
|
70
|
+
|
71
|
+
// Border with more whitespace, spans one column.
|
72
|
+
@mixin colborder {
|
73
|
+
padding-left: ($blueprint-grid-width - 2 * $blueprint-grid-margin - 1) / 2;
|
74
|
+
margin-left: ($blueprint-grid-width - 2 * $blueprint-grid-margin) / 2;
|
75
|
+
border-left: 1px solid #eeeeee; }
|
76
|
+
|
77
|
+
// Usage examples:
|
78
|
+
// As a top-level mixin, apply to any page that includes the stylesheet:
|
79
|
+
// <pre class="source-code sass">
|
80
|
+
// +rtl-typography
|
81
|
+
// </pre>
|
82
|
+
//
|
83
|
+
// Scoped by a presentational class:
|
84
|
+
// <pre class="source-code sass">
|
85
|
+
// body.blueprint
|
86
|
+
// +rtl-typography(true)
|
87
|
+
// </pre>
|
88
|
+
//
|
89
|
+
// Scoped by semantic selectors:
|
90
|
+
// <pre class="source-code sass">
|
91
|
+
// body#page-1, body#page-2, body.a-special-page-type
|
92
|
+
// +rtl-typography(true)
|
93
|
+
// </pre>
|
94
|
+
@mixin rtl-typography($nested: false) {
|
95
|
+
@if $nested {
|
96
|
+
html & { font-family: Arial, sans-serif; }
|
97
|
+
@include rtl-typography-defaults; }
|
98
|
+
@else {
|
99
|
+
html body { font-family: Arial, sans-serif; }
|
100
|
+
body { @include rtl-typography-defaults; }
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
@mixin rtl-typography-defaults {
|
105
|
+
h1, h2, h3, h4, h5, h6 {
|
106
|
+
font-family: Arial, sans-serif; }
|
107
|
+
pre, code, tt {
|
108
|
+
font-family: monospace; }
|
109
|
+
.right {
|
110
|
+
@include float-left;
|
111
|
+
margin: 1.5em 1.5em 1.5em 0;
|
112
|
+
padding: 0; }
|
113
|
+
.left {
|
114
|
+
@include float-right;
|
115
|
+
margin: 1.5em 0 1.5em 1.5em;
|
116
|
+
padding: 0; }
|
117
|
+
dd, ul, ol {
|
118
|
+
margin-left: 0;
|
119
|
+
margin-right: 1.5em; }
|
120
|
+
td, th {
|
121
|
+
text-align: right; } }
|
@@ -0,0 +1,52 @@
|
|
1
|
+
@import "grid";
|
2
|
+
@import "form";
|
3
|
+
|
4
|
+
// The styles contained here are meant to provide for an attractive experience out of the box
|
5
|
+
// and are expected to be removed once custom visual design begins.
|
6
|
+
|
7
|
+
// The +blueprint-scaffolding mixin must be mixed into the top level of your stylesheet.
|
8
|
+
// However, you can customize the body selector if you wish to control the scope
|
9
|
+
// of this mixin. Examples:
|
10
|
+
// Apply to any page including the stylesheet:
|
11
|
+
// +blueprint-scaffolding
|
12
|
+
// Scoped by a single presentational body class:
|
13
|
+
// +blueprint-scaffolding("body.blueprint")
|
14
|
+
// Semantically:
|
15
|
+
// +blueprint-scaffolding("body#page-1, body#page-2, body.a-special-page-type")
|
16
|
+
// Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults
|
17
|
+
// mixins to construct your own semantic style rules.
|
18
|
+
// @deprecated It is no longer necessary to pass any argument.
|
19
|
+
@mixin blueprint-scaffolding($nested: deprecated) {
|
20
|
+
@if $nested != deprecated {
|
21
|
+
@warn "It is no longer necessary to pass any argument to the blueprint-scaffolding mixin."
|
22
|
+
}
|
23
|
+
@include blueprint-scaffolding-defaults;
|
24
|
+
}
|
25
|
+
|
26
|
+
// The styles this mixin provides were deprecated in Blueprint 0.9 and is no
|
27
|
+
// longer part of the main scaffolding, but the mixin is still available if
|
28
|
+
// you want to use it.
|
29
|
+
@mixin blueprint-scaffolding-body {
|
30
|
+
margin: 1.5em 0; }
|
31
|
+
|
32
|
+
// Mixin +box to create a padded box inside a column.
|
33
|
+
@mixin box {
|
34
|
+
padding: 1.5em;
|
35
|
+
margin-bottom: 1.5em;
|
36
|
+
background: #e5ecf9; }
|
37
|
+
|
38
|
+
@mixin blueprint-scaffolding-defaults {
|
39
|
+
.box {
|
40
|
+
@include box; }
|
41
|
+
// Border on right hand side of a column. You can comment this out if you don't plan to use it.
|
42
|
+
.border {
|
43
|
+
@include border; }
|
44
|
+
// Border with more whitespace, spans one column.
|
45
|
+
.colborder {
|
46
|
+
@include colborder; }
|
47
|
+
hr {
|
48
|
+
@include colruler; }
|
49
|
+
hr.space {
|
50
|
+
@include colspacer; }
|
51
|
+
form.inline {
|
52
|
+
@include blueprint-inline-form; } }
|
@@ -0,0 +1,90 @@
|
|
1
|
+
@import "colors";
|
2
|
+
@import "compass/typography/links/link-colors";
|
3
|
+
@import "compass/utilities/general/float";
|
4
|
+
|
5
|
+
$blueprint-font-family: "Helvetica Neue", Arial, Helvetica, sans-serif !default;
|
6
|
+
|
7
|
+
$blueprint-fixed-font-family: "andale mono", "lucida console", monospace !default;
|
8
|
+
|
9
|
+
$blueprint-font-size: 12px !default;
|
10
|
+
|
11
|
+
// Usage examples:
|
12
|
+
// As a top-level mixin, apply to any page that includes the stylesheet:
|
13
|
+
// <pre class="source-code sass">
|
14
|
+
// +blueprint-typography
|
15
|
+
// </pre>
|
16
|
+
//
|
17
|
+
// Scoped by a presentational class:
|
18
|
+
// <pre class="source-code sass">
|
19
|
+
// body.blueprint
|
20
|
+
// +blueprint-typography(true)
|
21
|
+
// </pre>
|
22
|
+
//
|
23
|
+
// Scoped by semantic selectors:
|
24
|
+
// <pre class="source-code sass">
|
25
|
+
// body#page-1, body#page-2, body.a-special-page-type
|
26
|
+
// +blueprint-typography(true)
|
27
|
+
// </pre>
|
28
|
+
@mixin blueprint-typography($nested: false) {
|
29
|
+
@if $nested {
|
30
|
+
@include blueprint-typography-body;
|
31
|
+
@include blueprint-typography-defaults;
|
32
|
+
} @else {
|
33
|
+
body { @include blueprint-typography-body; }
|
34
|
+
@include blueprint-typography-defaults;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
@mixin normal-text { font-family: $blueprint-font-family; color: $font-color; }
|
39
|
+
@mixin fixed-width-text { font: 1em $blueprint-fixed-font-family; line-height: 1.5; }
|
40
|
+
@mixin header-text { font-weight: normal; color: $header-color; }
|
41
|
+
@mixin quiet { color: $quiet-color; }
|
42
|
+
@mixin loud { color: $loud-color; }
|
43
|
+
|
44
|
+
@mixin blueprint-typography-body($font-size: $blueprint-font-size) {
|
45
|
+
line-height: 1.5;
|
46
|
+
@include normal-text;
|
47
|
+
font-size: 100% * $font-size / 16px;
|
48
|
+
}
|
49
|
+
|
50
|
+
@mixin blueprint-typography-defaults {
|
51
|
+
#{headers(all)} { @include header-text;
|
52
|
+
img { margin: 0; } }
|
53
|
+
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.50em; }
|
54
|
+
h2 { font-size: 2em; margin-bottom: 0.75em; }
|
55
|
+
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1.00em; }
|
56
|
+
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
|
57
|
+
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.50em; }
|
58
|
+
h6 { font-size: 1em; font-weight: bold; }
|
59
|
+
p { margin: 0 0 1.5em;
|
60
|
+
.left { @include float-left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
|
61
|
+
.right { @include float-right; margin: 1.5em 0 1.5em 1.5em; padding: 0; } }
|
62
|
+
a { text-decoration: underline; @include link-colors($link-color, $link-hover-color, $link-active-color, $link-visited-color, $link-focus-color); }
|
63
|
+
blockquote { margin: 1.5em; color: $alt-text-color; font-style: italic; }
|
64
|
+
strong, dfn { font-weight: bold; }
|
65
|
+
em, dfn { font-style: italic; }
|
66
|
+
sup, sub { line-height: 0; }
|
67
|
+
abbr, acronym { border-bottom: 1px dotted #666666; }
|
68
|
+
address { margin: 0 0 1.5em; font-style: italic; }
|
69
|
+
del { color: $alt-text-color; }
|
70
|
+
pre { margin: 1.5em 0; white-space: pre; }
|
71
|
+
pre, code, tt { @include fixed-width-text; }
|
72
|
+
li ul, li ol { margin: 0; }
|
73
|
+
ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 1.5em; }
|
74
|
+
ul { list-style-type: disc; }
|
75
|
+
ol { list-style-type: decimal; }
|
76
|
+
dl { margin: 0 0 1.5em 0;
|
77
|
+
dt { font-weight: bold; } }
|
78
|
+
dd { margin-left: 1.5em; }
|
79
|
+
table { margin-bottom: 1.4em; width: 100%; }
|
80
|
+
th { font-weight: bold; }
|
81
|
+
thead th { background: $blueprint-table-header-color; }
|
82
|
+
th, td, caption { padding: 4px 10px 4px 5px; }
|
83
|
+
table.striped tr:nth-child(even) td,
|
84
|
+
table tr.even td
|
85
|
+
{ background: $blueprint-table-stripe-color; }
|
86
|
+
tfoot { font-style: italic; }
|
87
|
+
caption { background: $blueprint-background-color; }
|
88
|
+
.quiet { @include quiet; }
|
89
|
+
.loud { @include loud; }
|
90
|
+
}
|