cimma 0.1.1
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/lib/cimma.rb +4 -0
- data/stylesheets/_cimma.scss +6 -0
- data/stylesheets/cimma/_baseline.scss +5 -0
- data/stylesheets/cimma/_util.scss +4 -0
- data/stylesheets/cimma/baseline/_core.scss +5 -0
- data/stylesheets/cimma/baseline/_forms.scss +2 -0
- data/stylesheets/cimma/baseline/_html5.scss +1 -0
- data/stylesheets/cimma/baseline/_lists.scss +1 -0
- data/stylesheets/cimma/baseline/_tables.scss +2 -0
- data/stylesheets/cimma/baseline/_typography.scss +4 -0
- data/stylesheets/cimma/baseline/forms/_core.scss +141 -0
- data/stylesheets/cimma/baseline/forms/_status-backgrounds.scss +20 -0
- data/stylesheets/cimma/baseline/html5/_core.scss +25 -0
- data/stylesheets/cimma/baseline/lists/_core.scss +11 -0
- data/stylesheets/cimma/baseline/tables/_adaptive.scss +83 -0
- data/stylesheets/cimma/baseline/tables/_core.scss +52 -0
- data/stylesheets/cimma/baseline/tables/_extra-wide.scss +9 -0
- data/stylesheets/cimma/baseline/typography/_annotations.scss +44 -0
- data/stylesheets/cimma/baseline/typography/_core.scss +51 -0
- data/stylesheets/cimma/baseline/typography/_headlines.scss +30 -0
- data/stylesheets/cimma/baseline/typography/_quotes.scss +17 -0
- data/stylesheets/cimma/misc/_effects.scss +32 -0
- data/stylesheets/cimma/widgets/_buttons.scss +196 -0
- data/stylesheets/cimma/widgets/_dialog-boxes.scss +129 -0
- data/stylesheets/cimma/widgets/_dialog-boxes2.scss +238 -0
- data/stylesheets/cimma/widgets/_dialog.scss +85 -0
- data/stylesheets/cimma/widgets/_font-awesome.scss +264 -0
- data/stylesheets/cimma/widgets/_test.scss +31 -0
- data/templates/dialog-boxes/example.scss +42 -0
- data/templates/dialog-boxes/example2.scss +29 -0
- data/templates/dialog-boxes/images/old/dialog-error.png +0 -0
- data/templates/dialog-boxes/images/old/dialog-info.png +0 -0
- data/templates/dialog-boxes/images/old/dialog-success.png +0 -0
- data/templates/dialog-boxes/images/old/dialog-validation.png +0 -0
- data/templates/dialog-boxes/images/old/dialog-warning.png +0 -0
- data/templates/dialog-boxes/images/spritemap - 1pt.svg +76 -0
- data/templates/dialog-boxes/images/spritemap.png +0 -0
- data/templates/dialog-boxes/images/spritemap.svg +73 -0
- data/templates/dialog-boxes/manifest.rb +7 -0
- data/templates/drop-menu/drop-menu.js +124 -0
- data/templates/drop-menu/manifest.rb +7 -0
- data/templates/forms/images/spritemap - Copy.svg +66 -0
- data/templates/forms/images/spritemap.svg +104 -0
- data/templates/forms/manifest.rb +7 -0
- data/templates/project/_cimma.scss +3 -0
- data/templates/project/_variables.scss +24 -0
- data/templates/project/manifest.rb +13 -0
- metadata +140 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
$baseline-font-family: $sans-serif !default;
|
2
|
+
|
3
|
+
$line-height: 1.4 !default;
|
4
|
+
|
5
|
+
$a-link : #016bb0 !default; // dark cerulean
|
6
|
+
$a-visited: #662d91 !default; // royal purple
|
7
|
+
$a-hover : lighten($a-link, 15%) !default;
|
8
|
+
|
9
|
+
// -------------------------------------------------------------------------------- Block Elements
|
10
|
+
|
11
|
+
body {
|
12
|
+
font: 100%/#{$line-height} $baseline-font-family;
|
13
|
+
}
|
14
|
+
|
15
|
+
%baseline-common-block, #{headings()}, p, ul, ol, dl, table, blockquote, div, section, article, aside, fieldset, hgroup {
|
16
|
+
margin: 1em 0;
|
17
|
+
|
18
|
+
&:first-child {
|
19
|
+
margin-top: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
&:last-child {
|
23
|
+
margin-bottom: 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
// -------------------------------------------------------------------------------- Inline Elements
|
28
|
+
|
29
|
+
a {
|
30
|
+
color: $a-link;
|
31
|
+
&:visited { color: $a-visited; }
|
32
|
+
&:hover { color: $a-hover; }
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
abbr[title] { // Addresses styling not present in IE 8/9, Safari 5, and Chrome.
|
37
|
+
border-bottom: 1px dotted;
|
38
|
+
}
|
39
|
+
|
40
|
+
address {
|
41
|
+
white-space: pre;
|
42
|
+
white-space: pre-line;
|
43
|
+
}
|
44
|
+
|
45
|
+
b, strong { // Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
46
|
+
font-weight: bold;
|
47
|
+
}
|
48
|
+
|
49
|
+
small {
|
50
|
+
font-size: .8em; // Addresses inconsistent and variable font size in all browsers.
|
51
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
@import "modular-scale";
|
2
|
+
|
3
|
+
$heading-modular-sizes: true !default;
|
4
|
+
$heading-font-family: $optima !default;
|
5
|
+
$heading-scale-start: -2 !default;
|
6
|
+
$heading-scale: major-third() !default;
|
7
|
+
|
8
|
+
$heading-size-list: modular-scale-list($heading-scale-start, $heading-scale-start + 5, 1em, $heading-scale) !default;
|
9
|
+
|
10
|
+
@include headings {
|
11
|
+
font-family: $heading-font-family;
|
12
|
+
font-weight: 700;
|
13
|
+
@extend %size !optional;
|
14
|
+
}
|
15
|
+
|
16
|
+
@if $heading-modular-sizes {
|
17
|
+
$i: 6;
|
18
|
+
@each $s in $heading-size-list {
|
19
|
+
@if $s != unquote("MS-LIST:") { // this is stupid, why is this here?
|
20
|
+
h#{$i}%size {
|
21
|
+
font-size: $s;
|
22
|
+
|
23
|
+
@if $s > 1em {
|
24
|
+
margin: scale-em($s, 1em) 0;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
$i: $i - 1;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
blockquote {
|
2
|
+
border-top: 1px solid;
|
3
|
+
border-bottom: 1px solid;
|
4
|
+
margin: 1em 2em;
|
5
|
+
font-family: $serif;
|
6
|
+
padding: 1em;
|
7
|
+
|
8
|
+
&[cite]:after {
|
9
|
+
margin-top: 1em;
|
10
|
+
text-align: right;
|
11
|
+
font-style: italic;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
q {
|
16
|
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
17
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
// http://sachagreif.com/useful-sass-mixins/
|
2
|
+
|
3
|
+
$emboss-highlight: rgba(white, 0.5) !default;
|
4
|
+
$emboss-lowlight: rgba(black, 0.5) !default;
|
5
|
+
|
6
|
+
// ====================================================================================================
|
7
|
+
// | Box Effects
|
8
|
+
// ====================================================================================================
|
9
|
+
|
10
|
+
@mixin emboss-box {
|
11
|
+
box-shadow: 0 1px 0 $emboss-highlight, inset 0 1px 0 $emboss-lowlight;
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
@mixin soft-outer-glow($color) {
|
16
|
+
@include box-shadow(0px 0px .25em .25em $color);
|
17
|
+
}
|
18
|
+
|
19
|
+
// ====================================================================================================
|
20
|
+
// | Text Effects
|
21
|
+
// ====================================================================================================
|
22
|
+
|
23
|
+
@mixin letterpress-text($direction: inset) {
|
24
|
+
$offset: if($direction == inset, 1, -1);
|
25
|
+
text-shadow: $offset 1px 0 $emboss-lowlight;
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin emboss-text($direction: inset) {
|
29
|
+
text-shadow:
|
30
|
+
-1px -1px 1px if($direction == inset, $emboss-lowlight, $emboss-highlight),
|
31
|
+
1px 1px 1px if($direction == inset, $emboss-highlight, $emboss-lowlight);
|
32
|
+
}
|
@@ -0,0 +1,196 @@
|
|
1
|
+
@import "compass/utilities/color/contrast";
|
2
|
+
|
3
|
+
$button-gradient-style: simple;
|
4
|
+
$button-base-color: #4ba3cc !default;
|
5
|
+
$button-accent-color: false !default;
|
6
|
+
|
7
|
+
// @private, don't tinker with these variables...
|
8
|
+
$orig-button-gradient-style: $button-gradient-style;
|
9
|
+
$orig-button-base-color: $button-base-color;
|
10
|
+
$orig-button-accent-color: $button-accent-color;
|
11
|
+
|
12
|
+
$button-color1: $button-base-color;
|
13
|
+
$button-color2: $button-base-color;
|
14
|
+
|
15
|
+
// ====================================================================================================
|
16
|
+
// | Primary Mixins (Impure)
|
17
|
+
// ====================================================================================================
|
18
|
+
|
19
|
+
@mixin button($style: $button-gradient-style, $base: $button-base-color, $accent: $button-accent-color) {
|
20
|
+
$orig-button-gradient-style: $button-gradient-style !global;
|
21
|
+
$orig-button-base-color: $button-base-color !global;
|
22
|
+
$orig-button-accent-color: $button-accent-color !global;
|
23
|
+
|
24
|
+
$button-gradient-style: $style !global;
|
25
|
+
$button-base-color: $base !global;
|
26
|
+
$button-accent-color: $accent !global;
|
27
|
+
|
28
|
+
background-color: $base;
|
29
|
+
|
30
|
+
$color-stops: if($style == flat or $style == inset, $base, button-color-stops($style, $base, $accent));
|
31
|
+
$button-color1: first-color-stop($color-stops) !global;
|
32
|
+
$button-color2: last-color-stop($color-stops) !global;
|
33
|
+
|
34
|
+
@if length($color-stops) > 1 {
|
35
|
+
@include button-border;
|
36
|
+
@include button-shadow;
|
37
|
+
@include background-image(linear-gradient($color-stops...));
|
38
|
+
} @else if $style == inset {
|
39
|
+
@include inset-button;
|
40
|
+
}
|
41
|
+
|
42
|
+
@content;
|
43
|
+
|
44
|
+
$button-gradient-style: $orig-button-gradient-style !global;
|
45
|
+
$button-base-color: $orig-button-base-color !global;
|
46
|
+
$button-accent-color: $orig-button-accent-color !global;
|
47
|
+
}
|
48
|
+
|
49
|
+
@mixin button-states {
|
50
|
+
&%hover, &:hover {
|
51
|
+
@include button-hover;
|
52
|
+
cursor: hand;
|
53
|
+
cursor: pointer;
|
54
|
+
}
|
55
|
+
|
56
|
+
&%active, &:active {
|
57
|
+
@include button-active;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
// ====================================================================================================
|
62
|
+
// | Components
|
63
|
+
// ====================================================================================================
|
64
|
+
|
65
|
+
@mixin button-border($color: button-border-color()) {
|
66
|
+
border: 1px solid $color;
|
67
|
+
}
|
68
|
+
|
69
|
+
@mixin button-shadow($color: button-shadow-color()) {
|
70
|
+
@include box-shadow(inset 0 1px 0 $color, 0 1px 2px .5em rgba(#CCC, .3));
|
71
|
+
}
|
72
|
+
|
73
|
+
@mixin inset-button() {
|
74
|
+
@include box-shadow(inset 0 -1px 1px rgba(white, .3), inset 0 1px 1px rgba(black, .5));
|
75
|
+
}
|
76
|
+
|
77
|
+
// ---------------------------------------------------------------------- Text Appearance (Pure)
|
78
|
+
|
79
|
+
@mixin button-text($color: white, $style: inset) {
|
80
|
+
color: $color;
|
81
|
+
$shadow-color: contrast-color($color, rgba(black, .8), rgba(white, .3));
|
82
|
+
$shadow-offset: contrast-style($color, 1px, -1px);
|
83
|
+
@if $style == inset {
|
84
|
+
$shadow-offset: $shadow-offset * -1;
|
85
|
+
}
|
86
|
+
|
87
|
+
//@if $style == pillow {
|
88
|
+
// @include text-shadow(-2 (-2) 0 rgba(white, .3), 0 (-1) 0 rgba(black, .3), 0 1 0 rgba(black, .8), 0 2 0 rgba(white, .3));
|
89
|
+
//} @else {
|
90
|
+
@include text-shadow(0 $shadow-offset 0 $shadow-color);
|
91
|
+
//}
|
92
|
+
}
|
93
|
+
|
94
|
+
// ---------------------------------------------------------------------- Button States
|
95
|
+
|
96
|
+
@mixin button-hover($style: $button-gradient-style, $base: darken($button-base-color, 5%), $accent: darken(if($button-accent-color, $button-accent-color, $button-base-color), 5%)) {
|
97
|
+
background-color: $base;
|
98
|
+
$color-stops: if($style == flat, $base, button-color-stops($style, $base, $accent));
|
99
|
+
@include background-image(linear-gradient($color-stops));
|
100
|
+
}
|
101
|
+
|
102
|
+
@mixin button-active($style: $button-gradient-style, $base: $button-base-color, $accent: darken($button-color2, 8%)) {
|
103
|
+
@if $style == flat {
|
104
|
+
background-color: $base;
|
105
|
+
} @else {
|
106
|
+
@include box-shadow(inset 0 1px 2px $accent)
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
// ====================================================================================================
|
111
|
+
// | Helper Functions
|
112
|
+
// ====================================================================================================
|
113
|
+
|
114
|
+
@function button-border-color($color: $button-color2) {
|
115
|
+
@return darken($color, 5%);
|
116
|
+
}
|
117
|
+
|
118
|
+
@function button-shadow-color($color: $button-color1) {
|
119
|
+
@return lighten($color, 15%);
|
120
|
+
}
|
121
|
+
|
122
|
+
// ---------------------------------------------------------------------- Gradients (Pure)
|
123
|
+
|
124
|
+
@function button-color-stops-old($style, $base, $accent) {
|
125
|
+
$color1: $base;
|
126
|
+
$color2: if(not $accent, $base, $accent);
|
127
|
+
|
128
|
+
$brightnessDivsor: if(lightness($base) > 75, 2, 1);
|
129
|
+
|
130
|
+
@if $style == matte {
|
131
|
+
@if not $accent or $base == $accent {
|
132
|
+
$color1: lighten($base, 15%);
|
133
|
+
}
|
134
|
+
|
135
|
+
@return $color1, $color2 70%;
|
136
|
+
} @else if $style == shiny {
|
137
|
+
$color1: lighten($base, 25% / $brightnessDivsor);
|
138
|
+
|
139
|
+
@if not $accent or $base == $accent {
|
140
|
+
$color2: darken($base, 10%);
|
141
|
+
}
|
142
|
+
|
143
|
+
@return $color1, $base 50%, $color2;
|
144
|
+
} @else if $style == glass {
|
145
|
+
$color1: lighten($base, 8% / $brightnessDivsor);
|
146
|
+
|
147
|
+
@return $color1 50%, $base 51%;
|
148
|
+
} @else {
|
149
|
+
@if not $accent or $base == $accent {
|
150
|
+
$color2: darken($base, 10%);
|
151
|
+
}
|
152
|
+
|
153
|
+
@return $color1, $color2;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
@function button-color-stops($style, $base, $accent) {
|
158
|
+
$color1: $base;
|
159
|
+
$color2: if(not $accent, $base, $accent);
|
160
|
+
|
161
|
+
$brightnessDivsor: if(lightness($base) > 75, 2, 1);
|
162
|
+
|
163
|
+
@if $style == matte {
|
164
|
+
@if not $accent or $base == $accent {
|
165
|
+
$color2: darken($base, 15%);
|
166
|
+
}
|
167
|
+
|
168
|
+
@return $color1, $color2 70%;
|
169
|
+
} @else if $style == shiny {
|
170
|
+
$color1: lighten($base, 25% / $brightnessDivsor);
|
171
|
+
|
172
|
+
@if not $accent or $base == $accent {
|
173
|
+
$color2: darken($base, 10%);
|
174
|
+
}
|
175
|
+
|
176
|
+
@return $color1, $base 50%, $color2;
|
177
|
+
} @else if $style == glass {
|
178
|
+
$color2: darken($base, 8% / $brightnessDivsor);
|
179
|
+
|
180
|
+
@return $color1 50%, $color2 51%;
|
181
|
+
} @else {
|
182
|
+
@if not $accent or $base == $accent {
|
183
|
+
$color2: darken($base, 10%);
|
184
|
+
}
|
185
|
+
|
186
|
+
@return $color1, $color2;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
@function first-color-stop($colors) {
|
191
|
+
@return nth(nth($colors, 1), 1);
|
192
|
+
}
|
193
|
+
|
194
|
+
@function last-color-stop($colors) {
|
195
|
+
@return nth(nth($colors, length($colors)), 1);
|
196
|
+
}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
// --------------------------------------------------------------------------------
|
2
|
+
// Dialog boxes: attractive, scalable dialog boxes
|
3
|
+
// --------------------------------------------------------------------------------
|
4
|
+
|
5
|
+
// Spritemaps are assumed to be horizontal and the sprites are expected to be in the same order defined
|
6
|
+
// If you're using an SVG as a background, pass it as a list with a bitmap image placed last
|
7
|
+
|
8
|
+
@import "compass/css3/background-size";
|
9
|
+
@import "translucencss/util/images";
|
10
|
+
|
11
|
+
// ---------- Color/image definitions
|
12
|
+
$dialog-icon-width: 24px !default;
|
13
|
+
$dialog-icon-height: 24px !default;
|
14
|
+
$dialog-padding: 1em !default;
|
15
|
+
$dialog-border: 2px solid !default;
|
16
|
+
$dialog-fc-multiplier: 1.4 !default;
|
17
|
+
|
18
|
+
// class name | color | bg-color
|
19
|
+
$dialog-attributes:
|
20
|
+
( help #2E3192 #B9C2E1 // yellow
|
21
|
+
, info #005FB4 #BDE5F8 // blue
|
22
|
+
, success #6F7D03 #DFE5B0 // green
|
23
|
+
, warning #A0410D #EFBBA0 // orange
|
24
|
+
, error #C41616 #F8AAAA // red
|
25
|
+
) !default;
|
26
|
+
|
27
|
+
@mixin dialog-box($spritemap, $attributes: $dialog-attributes, $icon-width: $dialog-icon-width, $icon-height: $dialog-icon-height, $padding: $dialog-padding, $border: $dialog-border, $fc-multiplier: $dialog-fc-multiplier, $class: dialog) {
|
28
|
+
$offset: 0;
|
29
|
+
@each $a in $dialog-attributes {
|
30
|
+
$name: nth($a, 1);
|
31
|
+
$color: nth($a, 2);
|
32
|
+
$bg: nth($a, 3);
|
33
|
+
|
34
|
+
%dialog-colors.#{$name} {
|
35
|
+
@include dialog-color($color, $bg);
|
36
|
+
}
|
37
|
+
|
38
|
+
p.#{$class}.#{$name}, div.#{$class}.#{$name} > :first-child, ul.#{$class}.#{$name} li:only-child {
|
39
|
+
&:before {
|
40
|
+
background-position: $offset 0;
|
41
|
+
}
|
42
|
+
$icon-width: 24px;
|
43
|
+
$offset: $offset - $icon-width;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.dialog:first-child {
|
48
|
+
margin-top: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
p.#{$class}, div.#{$class}, ul.#{$class} {
|
52
|
+
padding: $padding;
|
53
|
+
border: $border;
|
54
|
+
@content;
|
55
|
+
@extend %dialog-colors;
|
56
|
+
}
|
57
|
+
|
58
|
+
p.#{$class}, ul.#{$class} {
|
59
|
+
@include dialog-p;
|
60
|
+
}
|
61
|
+
|
62
|
+
div.#{$class} {
|
63
|
+
@include dialog-div($fc-multiplier * 1em);
|
64
|
+
}
|
65
|
+
|
66
|
+
ul.#{$class} {
|
67
|
+
$border-width: if(type-of(nth($border, 1)) != number, 0, nth($border, 1));
|
68
|
+
@include dialog-ul($border-width);
|
69
|
+
}
|
70
|
+
|
71
|
+
p.#{$class}, div.#{$class} > :first-child, ul.#{$class} li:only-child {
|
72
|
+
&:before {
|
73
|
+
background: $spritemap no-repeat;
|
74
|
+
@if length($spritemap) > 1 {
|
75
|
+
@include svg-background(nth($spritemap, 1));
|
76
|
+
}
|
77
|
+
@include dialog-sprite($padding, $icon-width, $icon-height, length($dialog-attributes) * $icon-width $icon-height);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
// -------------------------------------------------------------------------------- Common styling
|
83
|
+
|
84
|
+
@mixin dialog-p {
|
85
|
+
&:first-line { font-weight: bold; }
|
86
|
+
}
|
87
|
+
|
88
|
+
@mixin dialog-div($font-size: 1.4em) {
|
89
|
+
> :first-child {
|
90
|
+
font-size: $font-size;
|
91
|
+
line-height: 1em;
|
92
|
+
margin-top: 0;
|
93
|
+
|
94
|
+
&:before {
|
95
|
+
@include rem(font-size, 1rem, 1em, scale-em($font-size, 1));
|
96
|
+
}
|
97
|
+
}
|
98
|
+
> :last-child { margin-bottom: 0 }
|
99
|
+
> * { color: inherit; }
|
100
|
+
}
|
101
|
+
|
102
|
+
@mixin dialog-ul($border-width: 2px) {
|
103
|
+
padding-left: 2em;
|
104
|
+
|
105
|
+
li {
|
106
|
+
margin-left: -$border-width;
|
107
|
+
}
|
108
|
+
|
109
|
+
li:only-child {
|
110
|
+
list-style-type: none;
|
111
|
+
margin-left: -1em;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
@mixin dialog-color($color, $bg) {
|
116
|
+
color: $color;
|
117
|
+
background-color: $bg;
|
118
|
+
}
|
119
|
+
|
120
|
+
@mixin dialog-sprite($padding: $dialog-padding, $width: $dialog-icon-width, $height: $dialog-icon-height, $bg-size: length($dialog-attributes) * $dialog-icon-width $dialog-icon-height) {
|
121
|
+
content: " ";
|
122
|
+
margin-right: $padding;
|
123
|
+
text-indent: 110%;
|
124
|
+
display: inline-block;
|
125
|
+
width: $width;
|
126
|
+
height: $height;
|
127
|
+
vertical-align: middle;
|
128
|
+
@include background-size($bg-size);
|
129
|
+
}
|