shipd_style 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock +37 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +140 -0
  9. data/Rakefile +2 -0
  10. data/config.rb +25 -0
  11. data/demo/carousel.html +79 -0
  12. data/demo/desktop-styles.html +80 -0
  13. data/demo/dialog.html +143 -0
  14. data/demo/index.html +63 -0
  15. data/demo/mobile-styles.html +253 -0
  16. data/demo/responsive-columns.html +87 -0
  17. data/demo/tablet-styles.html +79 -0
  18. data/lib/sass/_shipd-variables.scss +6 -0
  19. data/lib/sass/desktop/_button-form-elements.scss +15 -0
  20. data/lib/sass/desktop/_grid.scss +37 -0
  21. data/lib/sass/desktop/_layout-elements.scss +10 -0
  22. data/lib/sass/desktop/_typography.scss +6 -0
  23. data/lib/sass/desktop/_variable_overrides.scss +2 -0
  24. data/lib/sass/desktop/_variables.scss +2 -0
  25. data/lib/sass/mobile/_grid.scss +41 -0
  26. data/lib/sass/mobile/_oo-styles.scss +218 -0
  27. data/lib/sass/mobile/_typography.scss +50 -0
  28. data/lib/sass/mobile/widgets/_buttons.scss +134 -0
  29. data/lib/sass/mobile/widgets/_carousel.scss +16 -0
  30. data/lib/sass/mobile/widgets/_dialog-overlay.scss +37 -0
  31. data/lib/sass/mobile/widgets/_form-elements.scss +80 -0
  32. data/lib/sass/mobile/widgets/_header.scss +6 -0
  33. data/lib/sass/mobile/widgets/_page-layout.scss +9 -0
  34. data/lib/sass/shipd-all.scss +9 -0
  35. data/lib/sass/shipd-desktop.scss +9 -0
  36. data/lib/sass/shipd-mobile.scss +20 -0
  37. data/lib/sass/shipd-tablet.scss +9 -0
  38. data/lib/sass/tablet/_button-form-elements.scss +15 -0
  39. data/lib/sass/tablet/_grid.scss +39 -0
  40. data/lib/sass/tablet/_layout-elements.scss +15 -0
  41. data/lib/sass/tablet/_typography.scss +6 -0
  42. data/lib/sass/tablet/_variable_overrides.scss +2 -0
  43. data/lib/sass/tablet/_variables.scss +2 -0
  44. data/lib/sass/variables/_colors.scss +43 -0
  45. data/lib/sass/variables/_font.scss +7 -0
  46. data/lib/sass/variables/_form_spacing.scss +4 -0
  47. data/lib/sass/variables/_misc.scss +5 -0
  48. data/lib/sass/variables/_mixins.scss +45 -0
  49. data/lib/sass/variables/_spacing.scss +4 -0
  50. data/lib/shipd_style/copy_stylesheets.rb +16 -0
  51. data/lib/shipd_style/shipd_style.rake +9 -0
  52. data/lib/shipd_style/tasks.rb +3 -0
  53. data/lib/shipd_style/version.rb +3 -0
  54. data/lib/shipd_style.rb +5 -0
  55. data/lib/templates/carousel.html +6 -0
  56. data/lib/templates/dialog.html +15 -0
  57. data/lib/templates/page-layout.html +4 -0
  58. data/shipd_style.gemspec +25 -0
  59. metadata +144 -0
@@ -0,0 +1,218 @@
1
+ .block {
2
+ @include line;
3
+ }
4
+
5
+ .hidden {
6
+ display: none;
7
+ }
8
+
9
+ .overflow {
10
+ overflow: visible;
11
+ }
12
+
13
+ .no-overflow, .no-scroll {
14
+ overflow: hidden;
15
+ }
16
+
17
+ .absolute {
18
+ position: absolute;
19
+ }
20
+
21
+ .relative {
22
+ position: relative;
23
+ }
24
+
25
+
26
+
27
+ .inner-top {
28
+ padding-top: $spacing;
29
+ }
30
+
31
+ .inner-bottom {
32
+ padding-bottom: $spacing;
33
+ }
34
+
35
+ .inner-left {
36
+ padding-left: $spacing;
37
+ }
38
+
39
+ .inner-right {
40
+ padding-right: $spacing;
41
+ }
42
+
43
+ .no-padding {
44
+ padding: 0;
45
+ }
46
+
47
+
48
+
49
+ .pointer-cursor {
50
+ cursor: pointer;
51
+ }
52
+
53
+
54
+ .rounded {
55
+ @include rounded;
56
+ }
57
+
58
+ .circular {
59
+ @include border-radius(50%);
60
+ }
61
+
62
+
63
+
64
+ .centered-content {
65
+ text-align: center;
66
+ }
67
+
68
+ .centerable {
69
+ display: inline-block;
70
+ }
71
+
72
+
73
+
74
+ .shadow-container {
75
+ @include line;
76
+ padding-right: $shadow-padding;
77
+ padding-bottom: $shadow-padding;
78
+ }
79
+
80
+ .shadow {
81
+ @include shadowed;
82
+ }
83
+
84
+ .transparent {
85
+ @include opacity(0);
86
+ }
87
+
88
+ .opaque {
89
+ @include opacity(1);
90
+ }
91
+
92
+ .border {
93
+ @include bordered;
94
+ }
95
+
96
+ .border-left {
97
+ border-left: $border-width solid $neutral-20;
98
+ }
99
+
100
+ .border-right {
101
+ border-right: $border-width solid $neutral-20;
102
+ }
103
+
104
+ .border-top {
105
+ border-top: $border-width solid $neutral-20;
106
+ }
107
+
108
+ .border-bottom {
109
+ border-bottom: $border-width solid $neutral-20;
110
+ }
111
+
112
+ .no-border {
113
+ border: none;
114
+ }
115
+
116
+
117
+
118
+ // text styles
119
+
120
+ .wrap {
121
+ @include word-break(break-all);
122
+ }
123
+
124
+ .no-wrap {
125
+ white-space: nowrap;
126
+ }
127
+
128
+ .bold {
129
+ font-weight: bold;
130
+ }
131
+
132
+ .italic {
133
+ font-style: italic;
134
+ }
135
+
136
+ .small-text {
137
+ font-size: 0.9*$em;
138
+ }
139
+
140
+ .text-shadow {
141
+ @include text-shadowed;
142
+ }
143
+
144
+ .text-shadow-light {
145
+ @include text-shadowed-light;
146
+ }
147
+
148
+ // colored text
149
+
150
+ .light-text {
151
+ color: $neutral-20;
152
+ }
153
+
154
+ .primary-text {
155
+ color: $primary;
156
+ }
157
+
158
+ .accent-text {
159
+ color: $accent;
160
+ }
161
+
162
+ .accent-2-text {
163
+ color: $accent-2;
164
+ }
165
+
166
+ .info-text {
167
+ color: $info;
168
+ }
169
+
170
+ .info-2-text {
171
+ color: $info-2;
172
+ }
173
+
174
+ .warn-text {
175
+ color: $warn;
176
+ }
177
+
178
+ .error-text {
179
+ color: $error-dark;
180
+ }
181
+
182
+
183
+ // colored backgrounds
184
+ .background-light {
185
+ background-color: $lightest-color;
186
+ }
187
+
188
+ .background-dark {
189
+ background-color: $darkest-color;
190
+ }
191
+
192
+ .background-primary {
193
+ background-color: $primary;
194
+ }
195
+
196
+ .background-accent {
197
+ background-color: $accent;
198
+ }
199
+
200
+ .background-accent-2 {
201
+ background-color: $accent-2;
202
+ }
203
+
204
+ .background-info {
205
+ background-color: $info;
206
+ }
207
+
208
+ .background-info-2 {
209
+ background-color: $info-2;
210
+ }
211
+
212
+ .background-warn {
213
+ background-color: $warn;
214
+ }
215
+
216
+ .background-error {
217
+ background-color: $error;
218
+ }
@@ -0,0 +1,50 @@
1
+ body {
2
+ color: $darkest-color;
3
+ font-family: $body-font;
4
+ font-size: $em;
5
+ text-rendering: optimizeLegibility;
6
+ line-height: $line-height;
7
+ }
8
+
9
+ h1, h2, h3, h4 {
10
+ font-weight: bold;
11
+ padding-bottom: $em*0.1;
12
+ }
13
+
14
+ p { padding-bottom: $em*0.75; }
15
+
16
+ h1, h2, h3 { font-family: $headline-font; }
17
+ h4, h5, h6 { font-family: $headline-2-font; }
18
+
19
+ h1 { font-size: $em*1.7; line-height: 1; }
20
+ h2 { font-size: $em*1.5; line-height: 1.3; }
21
+ h3 { font-size: $em*1.3; line-height: 1.4; }
22
+ h4 { font-size: $em; }
23
+ h5 { font-size: $em*0.95; font-style: italic; }
24
+ h6 { font-size: $em*0.8; line-height: 2; }
25
+
26
+ a {
27
+ color: $info;
28
+ text-decoration: none;
29
+ }
30
+
31
+ a:hover {
32
+ text-decoration: underline;
33
+ }
34
+
35
+ em { font-style: italic; }
36
+ b { font-weight: bold; }
37
+
38
+ hr {
39
+ border: 0;
40
+ background-color: $neutral-20;
41
+ height: 1px;
42
+ }
43
+
44
+ ul.bullet-list {
45
+ list-style: disc; padding: $spacing; margin: $spacing;
46
+
47
+ li { padding: $spacing/2 $spacing; }
48
+ }
49
+
50
+ // TODO: same for numberend list
@@ -0,0 +1,134 @@
1
+ button,
2
+ input[type=submit] {
3
+ @include line;
4
+ }
5
+
6
+ button,
7
+ input[type=submit],
8
+ a.button,
9
+ div.button,
10
+ label.button {
11
+ // overrides that should be in reset/normalize
12
+ outline-style: none;
13
+ resize: none;
14
+ -webkit-appearance: none;
15
+ border: none;
16
+
17
+ display: block;
18
+ font-size: $em;
19
+ font-family: $button-font;
20
+ font-weight: bold;
21
+ background-color: $primary;
22
+ color: $darkest-color;
23
+ padding: $spacing*1.2 $spacing*3;
24
+ line-height: 1;
25
+ letter-spacing: 1px;
26
+ text-align: center;
27
+ white-space: normal;
28
+ cursor: pointer;
29
+
30
+ @include rounded;
31
+ @include shadowed;
32
+ @include line;
33
+
34
+ &:hover {
35
+ text-decoration: none;
36
+ background-color: $primary-light;
37
+ }
38
+
39
+ &:active {
40
+ background-color: $primary-dark;
41
+ @include depressed-shadow;
42
+ }
43
+
44
+ &.accent {
45
+ background-color: $accent;
46
+
47
+ &:hover {
48
+ background-color: $accent-light;
49
+ }
50
+
51
+ &:active {
52
+ background-color: $accent-dark;
53
+ }
54
+ }
55
+
56
+ &.accent-2 {
57
+ background-color: $accent-2;
58
+
59
+ &:hover {
60
+ background-color: $accent-2-light;
61
+ }
62
+
63
+ &:active {
64
+ background-color: $accent-2-dark;
65
+ }
66
+ }
67
+
68
+ &.neutral {
69
+ background-color: $neutral-50;
70
+
71
+ &:hover {
72
+ background-color: $neutral-40;
73
+ }
74
+
75
+ &:active {
76
+ background-color: $neutral-60;
77
+ }
78
+ }
79
+
80
+ &.info {
81
+ background-color: $info;
82
+ color: $neutral-10;
83
+
84
+ &:hover {
85
+ background-color: $info-light;
86
+ }
87
+
88
+ &:active {
89
+ background-color: $info-dark;
90
+ }
91
+ }
92
+
93
+ &.info-2 {
94
+ background-color: $info-2;
95
+ color: $neutral-10;
96
+
97
+ &:hover {
98
+ background-color: $info-2-light;
99
+ }
100
+
101
+ &:active {
102
+ background-color: $info-2-dark;
103
+ }
104
+ }
105
+
106
+ &.warn {
107
+ background-color: $warn;
108
+ color: $neutral-10;
109
+
110
+ &:hover {
111
+ background-color: $warn-light;
112
+ }
113
+
114
+ &:active {
115
+ background-color: $warn-dark;
116
+ }
117
+ }
118
+
119
+ &.error {
120
+ background-color: $error;
121
+
122
+ &:hover {
123
+ background-color: $error-light;
124
+ }
125
+
126
+ &:active {
127
+ background-color: $error-dark;
128
+ }
129
+ }
130
+
131
+ &.disabled {
132
+ @include opacity(0.3);
133
+ }
134
+ }
@@ -0,0 +1,16 @@
1
+ $carousel-transition-time: 1s;
2
+
3
+ .carousel-window {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+
9
+ .carousel-slide {
10
+ position: absolute;
11
+ width: 100%;
12
+ height: 100%;
13
+ transition-property: left;
14
+ transition-duration: $carousel-transition-time;
15
+ top: 0;
16
+ }
@@ -0,0 +1,37 @@
1
+ #overlay {
2
+ position: absolute;
3
+ overflow-y: scroll;
4
+ top: 0;
5
+ bottom: 0;
6
+ left: 0;
7
+ right: 0;
8
+ z-index: $overlay-height;
9
+ background-color: transparentize($darkest-color, 0.5);
10
+ @include opacity-transition;
11
+ }
12
+
13
+ .dialog-container {
14
+ display: block;
15
+ position: relative;
16
+ top: $spacing*2;
17
+ margin: 0 auto;
18
+ z-index: $overlay-height + 100;
19
+ @include opacity-transition;
20
+ }
21
+
22
+ .dialog-inner {
23
+ padding: $spacing*1.5;
24
+ }
25
+
26
+ .dialog {
27
+ background-color: $lightest-color;
28
+ @include box-shadow($darkest-color $spacing/3 $spacing/3 $spacing*2);
29
+
30
+ .close-x {
31
+ font-size: $em*2;
32
+ position: absolute;
33
+ right: $spacing*4;
34
+ top: $spacing*1.5;
35
+ cursor: pointer;
36
+ }
37
+ }
@@ -0,0 +1,80 @@
1
+ .input-container {
2
+ margin-top: $input-top-padding + $input-border-width + $shadow-padding/2;
3
+ margin-bottom: $input-top-padding;
4
+ margin-right: $input-side-padding $shadow-padding/2;
5
+ margin-left: $input-side-padding;
6
+ }
7
+
8
+ .input,
9
+ input[type=text],
10
+ input[type=password],
11
+ input[type=email],
12
+ textarea {
13
+ // overrides that should be in reset/normalize
14
+ outline-style: none;
15
+ resize: none;
16
+ -webkit-appearance: none;
17
+
18
+ @include line;
19
+ @include input-margin-fix;
20
+ @include border-radius;
21
+ @include bordered;
22
+ @include box-shadow(inset 0px $input-border-width-special $input-border-width-special $neutral-20);
23
+
24
+ background-color: $lightest-color;
25
+ font-size: $em;
26
+ color: $darkest-color;
27
+ padding: $input-top-padding $input-side-padding;
28
+
29
+ &:focus {
30
+ @include focus-input-padding-fix;
31
+ border: $input-border-width-special solid $primary;
32
+ @include box-shadow(inset 0px $input-border-width-special*1.5 $input-border-width-special*1.5 $neutral-20);
33
+ }
34
+ }
35
+
36
+ input[type=checkbox] {
37
+ -webkit-appearance: checkbox;
38
+ }
39
+ input[type=radio] {
40
+ -webkit-appearance: radio;
41
+ }
42
+
43
+ textarea {
44
+ min-height: 100px;
45
+ }
46
+ @-moz-document url-prefix() {
47
+ textarea {
48
+ font-family: $body-font;
49
+ }
50
+ }
51
+
52
+ form {
53
+ .error-message {
54
+ display: none;
55
+ }
56
+
57
+ .error {
58
+ .error-message {
59
+ display: block;
60
+ color: $error-dark;
61
+ }
62
+
63
+ .file-input {
64
+ border: $input-border-width solid $error;
65
+ }
66
+
67
+ input[type=text],
68
+ input[type=password],
69
+ input[type=email],
70
+ textarea {
71
+ border: $input-border-width-special solid $error;
72
+ @include focus-input-padding-fix;
73
+
74
+ &:focus {
75
+ @include focus-input-padding-fix;
76
+ border: $input-border-width-special solid $primary;
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,6 @@
1
+ #header {
2
+ background-color: $primary;
3
+ height: 3 * $em;
4
+ border-bottom: 1px solid transparentize($lightest-color, 0.8);
5
+ @include box-shadow($darkest-color 0px 0.5px 10px);
6
+ }
@@ -0,0 +1,9 @@
1
+ body {
2
+ background-color: $neutral-60;
3
+ }
4
+
5
+ #page {
6
+ @include line;
7
+ width: 100%;
8
+ background-color: $lightest-color;
9
+ }
@@ -0,0 +1,9 @@
1
+ @import "shipd-mobile";
2
+
3
+ @media screen and (min-width: 768px) {
4
+ @import "shipd-tablet";
5
+ }
6
+
7
+ @media screen and (min-width: 1024px) {
8
+ @import "shipd-desktop";
9
+ }
@@ -0,0 +1,9 @@
1
+ @import "compass/css3";
2
+ @import "shipd-variables";
3
+
4
+
5
+ @import "desktop/variables";
6
+ @import "desktop/typography";
7
+ @import "desktop/layout-elements";
8
+ @import "desktop/button-form-elements";
9
+ @import "desktop/grid";
@@ -0,0 +1,20 @@
1
+ /* This is the main CSS base class. Import it into HTML via:
2
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
3
+ */
4
+
5
+ @import "compass/reset";
6
+ @import "compass/css3";
7
+ @import "shipd-variables";
8
+
9
+ @import "mobile/grid";
10
+ @import "mobile/typography";
11
+
12
+ // below this line is optional
13
+ @import "mobile/oo-styles"; // for brevity, pick and choose your styles
14
+
15
+ @import "mobile/widgets/form-elements";
16
+ @import "mobile/widgets/buttons";
17
+ @import "mobile/widgets/page-layout";
18
+ @import "mobile/widgets/header";
19
+ @import "mobile/widgets/dialog-overlay";
20
+ @import "mobile/widgets/carousel";
@@ -0,0 +1,9 @@
1
+ @import "compass/css3";
2
+ @import "shipd-variables";
3
+
4
+
5
+ @import "tablet/variables";
6
+ @import "tablet/typography";
7
+ @import "tablet/layout-elements";
8
+ @import "tablet/button-form-elements";
9
+ @import "tablet/grid";
@@ -0,0 +1,15 @@
1
+ button,
2
+ input[type=submit],
3
+ a.button,
4
+ div.button,
5
+ label.button {
6
+ font-size: $em;
7
+ }
8
+
9
+ .input,
10
+ input[type=text],
11
+ input[type=password],
12
+ input[type=email],
13
+ textarea {
14
+ font-size: $em;
15
+ }
@@ -0,0 +1,39 @@
1
+ .inner {
2
+ padding: $spacing;
3
+ @include line;
4
+ }
5
+
6
+ .spacer {
7
+ width: $spacing;
8
+ height: $spacing;
9
+ }
10
+
11
+ // mobile overrides
12
+ .m-row { float: left; width: auto; }
13
+
14
+ // creates a row in tablet mode only
15
+ .t-row {
16
+ width: 100%;
17
+ @include line;
18
+ }
19
+
20
+ .m-hidden { display: block; }
21
+ .d-hidden { display: block; }
22
+ .t-hidden { display: none; }
23
+
24
+ .t-unit{float:left;}
25
+ .t-unit-right{float:right;}
26
+ .t-size-1-1{width:100%;}
27
+ .t-size-1-2{width:50%;}
28
+ .t-size-1-3{width:33.33333%;}
29
+ .t-size-1-4{width:25%;}
30
+ .t-size-1-5{width:20%;}
31
+ .t-size-2-3{width:66.66666%;}
32
+ .t-size-2-5{width:40%;}
33
+ .t-size-3-4{width:75%;}
34
+ .t-size-3-5{width:60%;}
35
+ .t-size-4-5{width:80%;}
36
+
37
+ .right {
38
+ float: right;
39
+ }
@@ -0,0 +1,15 @@
1
+ #page {
2
+ max-width: $tablet-break-point - $spacing*2;
3
+ margin: 0 auto;
4
+ @include box-shadow($darkest-color 0 0 $spacing*2)
5
+ }
6
+
7
+ #header {
8
+ .inner {
9
+ padding: 10px;
10
+ }
11
+ }
12
+
13
+ .dialog-container {
14
+ width: 50%;
15
+ }
@@ -0,0 +1,6 @@
1
+ h1 { font-size: $em*2.2; }
2
+ h2 { font-size: $em*1.8; }
3
+ h3 { font-size: $em*1.5; }
4
+ body, h4, p { font-size: $em; }
5
+ h5 { font-size: $em*0.9; }
6
+ h6 { font-size: $em*0.75; }
@@ -0,0 +1,2 @@
1
+ $em: 18px;
2
+ $spacing: 20px;
@@ -0,0 +1,2 @@
1
+ @import "../shipd-variables";
2
+ @import "variable_overrides";