compass-susy-plugin 0.7.0.pre6 → 0.7.0.pre7
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.
- data/Manifest +11 -11
- data/README.mkdn +121 -99
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/compass-susy-plugin.gemspec +7 -7
- data/sass/susy/_grid.scss +110 -0
- data/sass/susy/_reset.scss +7 -0
- data/sass/susy/_susy.scss +18 -0
- data/sass/susy/_text.scss +5 -0
- data/sass/susy/_utils.scss +73 -0
- data/sass/susy/_vertical_rhythm.scss +99 -0
- data/templates/project/{_base.sass → _base.scss} +18 -19
- data/templates/project/_defaults.scss +138 -0
- data/templates/project/ie.scss +7 -0
- data/templates/project/manifest.rb +5 -5
- data/templates/project/print.scss +20 -0
- data/templates/project/screen.scss +36 -0
- metadata +16 -16
- data/sass/susy/_grid.sass +0 -126
- data/sass/susy/_reset.sass +0 -6
- data/sass/susy/_susy.sass +0 -22
- data/sass/susy/_text.sass +0 -6
- data/sass/susy/_utils.sass +0 -80
- data/sass/susy/_vertical_rhythm.sass +0 -101
- data/templates/project/_defaults.sass +0 -146
- data/templates/project/ie.sass +0 -9
- data/templates/project/print.sass +0 -25
- data/templates/project/screen.sass +0 -48
@@ -0,0 +1,18 @@
|
|
1
|
+
//** Susy **//
|
2
|
+
|
3
|
+
// Tell susy whether you are using hacks or conditional comments.
|
4
|
+
$hacks: true !default;
|
5
|
+
|
6
|
+
// Import all the Important Stuff.
|
7
|
+
@import "compass/css3";
|
8
|
+
@import "utils";
|
9
|
+
@import "text";
|
10
|
+
@import "grid";
|
11
|
+
|
12
|
+
// Set Susy on your BODY element to get things started.
|
13
|
+
@mixin susy($align: center) {
|
14
|
+
@include establish-baseline;
|
15
|
+
// text-align set to center by default for auto-centering layouts
|
16
|
+
// - override $align for left/right-aligned designs
|
17
|
+
body {
|
18
|
+
text-align: $align; } }
|
@@ -0,0 +1,73 @@
|
|
1
|
+
//** Susy Utilities **//
|
2
|
+
|
3
|
+
// An extension of the Compass Core Utilities
|
4
|
+
@import "compass/utilities";
|
5
|
+
|
6
|
+
// Apply to you container element(s) to show a grid image.
|
7
|
+
// - You need to supply the image. Susy can't do everything.
|
8
|
+
@mixin show-grid($src) {
|
9
|
+
background: {
|
10
|
+
image: image-url($src);
|
11
|
+
repeat: repeat;
|
12
|
+
position: $side-gutter-width 0; }; }
|
13
|
+
|
14
|
+
// Brings IE in line with inline-block display
|
15
|
+
// - Using hacks if called automatically because $hacks == true
|
16
|
+
// - Or not, if you call it from ie.sass because $hacks == false
|
17
|
+
@mixin ie-inline-block($hack: false) {
|
18
|
+
@if $hack {
|
19
|
+
/* ugly hacks for IE6-7 */
|
20
|
+
#display: inline;
|
21
|
+
// fixes alignment against native input/button on IE6
|
22
|
+
#vertical-align: auto;
|
23
|
+
/* end ugly hacks */ }
|
24
|
+
@else {
|
25
|
+
display: inline;
|
26
|
+
// fixes alignment against native input/button on IE6
|
27
|
+
vertical-align: auto; } }
|
28
|
+
|
29
|
+
// An override for compass inline-block that lets you take advantage
|
30
|
+
// of Susys $hacks constant. if true, hacks. if false, use ie-inline-block
|
31
|
+
// to help ie along in your ie.sass
|
32
|
+
@mixin inline-block {
|
33
|
+
display: -moz-inline-box;
|
34
|
+
-moz-box-orient: vertical;
|
35
|
+
display: inline-block;
|
36
|
+
vertical-align: middle;
|
37
|
+
@if $hacks {
|
38
|
+
@include ie-inline-block(true); } }
|
39
|
+
|
40
|
+
// An inline-block list that works in IE
|
41
|
+
// For those awkward moments when a floated horizontal list just wont cut it
|
42
|
+
// NOTE: If global !hacks == false:
|
43
|
+
// - you'll need to fix list items in ie.sass with +ie-inline-block
|
44
|
+
@mixin inline-block-list($hpad: 0) {
|
45
|
+
@include horizontal-list-container;
|
46
|
+
li {
|
47
|
+
@include no-bullet;
|
48
|
+
@include inline-block;
|
49
|
+
white-space: no-wrap;
|
50
|
+
padding: {
|
51
|
+
left: $hpad;
|
52
|
+
right: $hpad; }; } }
|
53
|
+
|
54
|
+
// Hide an element from the viewport, but keep it around for accessability
|
55
|
+
@mixin hide {
|
56
|
+
position: absolute;
|
57
|
+
top: -9999em; }
|
58
|
+
|
59
|
+
// Apply to skip-to-content accessibility links that will appear on focus.
|
60
|
+
// - Set the location arguments if you care where it appears.
|
61
|
+
@mixin skip-link($t: 0, $r: false, $b: false, $l: false) {
|
62
|
+
@include hide;
|
63
|
+
display: block;
|
64
|
+
&:focus {
|
65
|
+
@if $t {
|
66
|
+
top: $t; }
|
67
|
+
@if $r {
|
68
|
+
right: $r; }
|
69
|
+
@if $b {
|
70
|
+
bottom: $b; }
|
71
|
+
@if $l {
|
72
|
+
left: $l; }
|
73
|
+
z-index: 999; } }
|
@@ -0,0 +1,99 @@
|
|
1
|
+
//** Vertical Rhythm **//
|
2
|
+
// By Chris Eppstein and Eric Meyer, living here on a temporary basis
|
3
|
+
|
4
|
+
// set the default border style for rhythm borders
|
5
|
+
$default-rhythm-border-style: solid !default;
|
6
|
+
|
7
|
+
// The IE font ratio is a fact of life. Deal with it.
|
8
|
+
$ie-font-ratio: 16px / 100%;
|
9
|
+
|
10
|
+
// The base line height is the basic unit of line hightness.
|
11
|
+
$base-line-height: 18px !default;
|
12
|
+
|
13
|
+
// The base font size
|
14
|
+
$base-font-size: 12px !default;
|
15
|
+
|
16
|
+
// The basic unit of font rhythm
|
17
|
+
$base-rhythm-unit: $base-line-height / $base-font-size * 1em;
|
18
|
+
|
19
|
+
// The leader is the amount of whitespace in a line.
|
20
|
+
// It might be useful in your calculations
|
21
|
+
$base-leader: ($base-line-height - $base-font-size) * 1em / $base-font-size;
|
22
|
+
|
23
|
+
// The half-leader is the amount of whitespace above and below a line.
|
24
|
+
// It might be useful in your calculations
|
25
|
+
$base-half-leader: $base-leader / 2;
|
26
|
+
|
27
|
+
// Establishes a font baseline for the given font-size in pixels
|
28
|
+
@mixin establish-baseline($font-size: $base-font-size) {
|
29
|
+
body {
|
30
|
+
font-size: $font-size / $ie-font-ratio;
|
31
|
+
@include adjust-leading-to(1, $font-size); }
|
32
|
+
html>body {
|
33
|
+
font-size: $font-size; } }
|
34
|
+
|
35
|
+
// Show a background image that can be used to debug your alignments.
|
36
|
+
@mixin debug-vertical-alignment {
|
37
|
+
background: url(underline.png); }
|
38
|
+
|
39
|
+
// Adjust a block to have a different font size and leading to maintain the rhythm.
|
40
|
+
// $lines is a number that is how many times the baseline rhythm this
|
41
|
+
// font size should use up. Does not have to be an integer, but it defaults
|
42
|
+
// to the smallest integer that is large enough to fit the font.
|
43
|
+
// Use $from_size to adjust from a non-base font-size.
|
44
|
+
@mixin adjust-font-size-to($to-size, $lines: ceil($to-size / $base-line-height), $from-size: $base-font-size) {
|
45
|
+
font-size: 1em * $to-size / $from-size;
|
46
|
+
@include adjust-leading-to($lines, $to-size); }
|
47
|
+
|
48
|
+
@mixin adjust-leading-to($lines, $font-size: $base-font-size) {
|
49
|
+
line-height: 1em * $lines * $base-line-height / $font-size; }
|
50
|
+
|
51
|
+
// Apply leading whitespace
|
52
|
+
@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
|
53
|
+
#{$property}-top: 1em * $lines * $base-line-height / $font-size; }
|
54
|
+
|
55
|
+
@mixin padding-leader($lines: 1, $font-size: $base-font-size) {
|
56
|
+
@include leader($lines, $font-size, padding); }
|
57
|
+
|
58
|
+
@mixin margin-leader($lines: 1, $font-size: $base-font-size) {
|
59
|
+
@include leader($lines, $font-size, margin); }
|
60
|
+
|
61
|
+
// Apply trailing whitespace
|
62
|
+
@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) {
|
63
|
+
#{$property}-bottom: 1em * $lines * $base-line-height / $font-size; }
|
64
|
+
|
65
|
+
@mixin padding-trailer($lines: 1, $font-size: $base-font-size) {
|
66
|
+
@include trailer($lines, $font-size, padding); }
|
67
|
+
|
68
|
+
@mixin margin-trailer($lines: 1, $font-size: $base-font-size) {
|
69
|
+
@include trailer($lines, $font-size, margin); }
|
70
|
+
|
71
|
+
// Apply a border width to any side without destroying the vertical rhythm
|
72
|
+
@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
73
|
+
border-#{$side}: {
|
74
|
+
style: $border-style;
|
75
|
+
width: 1em * $width / $font-size; };
|
76
|
+
padding-#{$side}: 1em / $font-size * ($lines * $base-line-height - $width); }
|
77
|
+
|
78
|
+
// Aplly rhythm borders equally to all sides
|
79
|
+
@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
80
|
+
border: {
|
81
|
+
style: $border-style;
|
82
|
+
width: 1em * $width / $font-size; };
|
83
|
+
padding: 1em / $font-size * ($lines * $base-line-height - $width); }
|
84
|
+
|
85
|
+
// Apply a leading rhythm border
|
86
|
+
@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
87
|
+
@include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style); }
|
88
|
+
|
89
|
+
// Apply a trailing rhythm border
|
90
|
+
@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
91
|
+
@include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style); }
|
92
|
+
|
93
|
+
// Apply both leading and trailing rhythm borders
|
94
|
+
@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
95
|
+
@include leading-border($width, $lines, $font-size, $border-style);
|
96
|
+
@include trailing-border($width, $lines, $font-size, $border-style); }
|
97
|
+
|
98
|
+
@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
|
99
|
+
@include horizontal-borders($width, $lines, $font-size, $border-style); }
|
@@ -4,55 +4,54 @@
|
|
4
4
|
// Site: www.oddbird.net/susy/
|
5
5
|
//**
|
6
6
|
|
7
|
-
|
8
7
|
// FONT-SIZE
|
9
8
|
// Override these values as needed (defaults are 12/18)
|
10
|
-
!base_font_size = 16px
|
11
|
-
!base_line_height = 24px
|
12
9
|
|
10
|
+
$base-font-size: 16px;
|
11
|
+
$base-line-height: 24px;
|
13
12
|
|
14
13
|
// GRID
|
15
14
|
// Set these values as needed for your grid layout.
|
16
15
|
// - defaults are shown.
|
17
|
-
!total_cols = 12
|
18
|
-
!col_width = 4em
|
19
|
-
!gutter_width = 1em
|
20
|
-
!side_gutter_width = !gutter_width
|
21
16
|
|
17
|
+
$total-cols: 12;
|
18
|
+
$col-width: 4em;
|
19
|
+
$gutter-width: 1em;
|
20
|
+
$side-gutter-width: $gutter-width;
|
22
21
|
|
23
22
|
// OMEGA_FLOAT
|
24
23
|
// By default, +omega elements are floated right.
|
25
24
|
// You can override that globally here:
|
26
|
-
// !omega_float = "right"
|
27
25
|
|
26
|
+
// $omega_float: right
|
28
27
|
|
29
28
|
// HACKS
|
30
29
|
// Are you using hacks or conditional comments? Susy makes both possible.
|
31
|
-
// Leave this as 'true' to use hacks, set it as false for conditional
|
32
|
-
// Conditional comments will require overrides for +omega,
|
33
|
-
// several other mixins.
|
34
|
-
// !hacks = true
|
30
|
+
// Leave this as 'true' to use hacks, set it as false for conditional
|
31
|
+
// comments. Conditional comments will require overrides for +omega,
|
32
|
+
// +inline-block and several other mixins.
|
35
33
|
|
34
|
+
// $hacks: true
|
36
35
|
|
37
36
|
// SUSY
|
38
37
|
// Don't move this @import above the GRID and FONT-SIZE overrides.
|
39
|
-
@import susy/susy.sass
|
40
38
|
|
39
|
+
@import "susy/susy";
|
41
40
|
|
42
41
|
// COLORS
|
43
42
|
// Set any colors you will need later.
|
44
|
-
!base = black
|
45
|
-
!alt = #005498
|
46
43
|
|
44
|
+
$base: black;
|
45
|
+
$alt: #005498;
|
47
46
|
|
48
47
|
// FONTS
|
49
48
|
// Give yourself some font stacks to work with.
|
50
|
-
=sans-family
|
51
|
-
font-family: Helvetica, Arial, sans-serif
|
52
49
|
|
53
|
-
|
54
|
-
font-family:
|
50
|
+
@mixin sans-family {
|
51
|
+
font-family: Helvetica, Arial, sans-serif; }
|
55
52
|
|
53
|
+
@mixin serif-family {
|
54
|
+
font-family: Baskerville, Palatino, serif; }
|
56
55
|
|
57
56
|
// OTHER MIXINS
|
58
57
|
// Mixins set here will be available in defaults, screen, print and IE
|
@@ -0,0 +1,138 @@
|
|
1
|
+
//** DEFAULT STYLES **//
|
2
|
+
// Don't forget to set your default styles.
|
3
|
+
|
4
|
+
// Get all the details and mixins from base.sass
|
5
|
+
@import "base";
|
6
|
+
|
7
|
+
// Reset browser defaults, and prepare block-level HTML5 elements
|
8
|
+
@import "susy/reset";
|
9
|
+
|
10
|
+
/* @group defaults */
|
11
|
+
|
12
|
+
body {
|
13
|
+
@include sans-family;
|
14
|
+
color: $base; }
|
15
|
+
|
16
|
+
/* @group links */
|
17
|
+
|
18
|
+
:focus {
|
19
|
+
outline: 1px dotted $alt; }
|
20
|
+
|
21
|
+
a {
|
22
|
+
&:link, &:visited {
|
23
|
+
color: $alt; }
|
24
|
+
&:focus, &:hover, &:active {
|
25
|
+
color: $alt - #222222;
|
26
|
+
text-decoration: none; } }
|
27
|
+
|
28
|
+
/* @end */
|
29
|
+
|
30
|
+
/* @group inline tags */
|
31
|
+
|
32
|
+
cite {
|
33
|
+
font-style: italic; }
|
34
|
+
|
35
|
+
em {
|
36
|
+
font-style: italic; }
|
37
|
+
|
38
|
+
strong {
|
39
|
+
font-weight: bold; }
|
40
|
+
|
41
|
+
ins {
|
42
|
+
text-decoration: underline; }
|
43
|
+
|
44
|
+
del {
|
45
|
+
text-decoration: line-through; }
|
46
|
+
|
47
|
+
q {
|
48
|
+
font-style: italic;
|
49
|
+
em {
|
50
|
+
font-style: normal; } }
|
51
|
+
|
52
|
+
/* @end */
|
53
|
+
|
54
|
+
/* @group replaced tags */
|
55
|
+
|
56
|
+
img {
|
57
|
+
vertical-align: bottom; }
|
58
|
+
|
59
|
+
/* @end */
|
60
|
+
|
61
|
+
/* @group headers */
|
62
|
+
|
63
|
+
h1, h2, h3, h4, h5, h6 {
|
64
|
+
font-weight: bold; }
|
65
|
+
|
66
|
+
/* @end */
|
67
|
+
|
68
|
+
/* @group block tags */
|
69
|
+
|
70
|
+
p {
|
71
|
+
@include leader;
|
72
|
+
@include trailer; }
|
73
|
+
|
74
|
+
@mixin list-default($ol: false) {
|
75
|
+
@include leader;
|
76
|
+
@include trailer;
|
77
|
+
@if $ol {
|
78
|
+
list-style: decimal; }
|
79
|
+
@else {
|
80
|
+
list-style: disc; } }
|
81
|
+
|
82
|
+
@mixin no-style-list {
|
83
|
+
@include no-bullets;
|
84
|
+
margin: 0;
|
85
|
+
padding: 0; }
|
86
|
+
|
87
|
+
ol {
|
88
|
+
@include list-default(ol); }
|
89
|
+
|
90
|
+
ul {
|
91
|
+
@include list-default; }
|
92
|
+
|
93
|
+
blockquote {
|
94
|
+
margin: $base-rhythm-unit;
|
95
|
+
@include serif-family; }
|
96
|
+
|
97
|
+
/* @end */
|
98
|
+
|
99
|
+
/* @group tables */
|
100
|
+
|
101
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
102
|
+
|
103
|
+
table {
|
104
|
+
width: 100%;
|
105
|
+
border: {
|
106
|
+
width: 0;
|
107
|
+
style: solid;
|
108
|
+
color: $base; };
|
109
|
+
@include horizontal-borders(1px, 0.5); }
|
110
|
+
|
111
|
+
th {
|
112
|
+
font-weight: bold; }
|
113
|
+
|
114
|
+
/* @end */
|
115
|
+
|
116
|
+
/* @group forms */
|
117
|
+
|
118
|
+
fieldset {
|
119
|
+
@include trailer; }
|
120
|
+
|
121
|
+
legend {
|
122
|
+
font-weight: bold;
|
123
|
+
font-variant: small-caps; }
|
124
|
+
|
125
|
+
label {
|
126
|
+
display: block;
|
127
|
+
@include leader; }
|
128
|
+
|
129
|
+
legend + label {
|
130
|
+
margin-top: 0; }
|
131
|
+
|
132
|
+
textarea, input:not([type="radio"]) {
|
133
|
+
@include box-sizing(border-box);
|
134
|
+
width: 100%; }
|
135
|
+
|
136
|
+
/* @end */
|
137
|
+
|
138
|
+
/* @end */
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/* Welcome to Susy. Use this file to write IE specific override styles.
|
2
|
+
* Import this file using the following HTML or equivalent:
|
3
|
+
* <!--[if IE]>
|
4
|
+
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
5
|
+
* <![endif]--> */
|
6
|
+
|
7
|
+
@import "base";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
stylesheet 'screen.
|
2
|
-
stylesheet 'print.
|
3
|
-
stylesheet 'ie.
|
4
|
-
stylesheet '_base.
|
5
|
-
stylesheet '_defaults.
|
1
|
+
stylesheet 'screen.scss', :media => "screen, projection"
|
2
|
+
stylesheet 'print.scss', :media => "print"
|
3
|
+
stylesheet 'ie.scss', :media => "screen, projection"
|
4
|
+
stylesheet '_base.scss'
|
5
|
+
stylesheet '_defaults.scss'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/* Welcome to Susy. Use this file to define print styles.
|
2
|
+
* Import this file using the following HTML or equivalent:
|
3
|
+
* <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" /> */
|
4
|
+
|
5
|
+
@import "defaults";
|
6
|
+
|
7
|
+
@mixin print {
|
8
|
+
nav {
|
9
|
+
display: none; }
|
10
|
+
* {
|
11
|
+
float: none !important; }
|
12
|
+
body {
|
13
|
+
@include serif-family;
|
14
|
+
font-size: 12pt;
|
15
|
+
background: white;
|
16
|
+
color: black; }
|
17
|
+
a:link:after, a:visited:after {
|
18
|
+
content: " (" attr(href) ") "; } }
|
19
|
+
|
20
|
+
@include print;
|