crossbar 0.0.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.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +13 -0
  3. data/.gitignore +16 -0
  4. data/.scss-lint.yml +166 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.md +22 -0
  7. data/README.md +96 -0
  8. data/Rakefile +8 -0
  9. data/app/assets/stylesheets/base/_all.scss +24 -0
  10. data/app/assets/stylesheets/base/_button.scss +50 -0
  11. data/app/assets/stylesheets/base/_form.scss +99 -0
  12. data/app/assets/stylesheets/base/_image.scss +5 -0
  13. data/app/assets/stylesheets/base/_list.scss +34 -0
  14. data/app/assets/stylesheets/base/_table.scss +24 -0
  15. data/app/assets/stylesheets/base/_typography.scss +106 -0
  16. data/app/assets/stylesheets/base/extends/.keep +0 -0
  17. data/app/assets/stylesheets/base/functions/_colors.scss +33 -0
  18. data/app/assets/stylesheets/base/functions/_list-attributes.scss +10 -0
  19. data/app/assets/stylesheets/base/mixins/.keep +0 -0
  20. data/app/assets/stylesheets/base/variables/_colors.scss +23 -0
  21. data/app/assets/stylesheets/base/variables/_fonts.scss +0 -0
  22. data/app/assets/stylesheets/base/variables/_inputs.scss +22 -0
  23. data/app/assets/stylesheets/base/variables/_variables.scss +188 -0
  24. data/app/assets/stylesheets/base/vendor/normalize.css +427 -0
  25. data/app/assets/stylesheets/layout/_all.scss +0 -0
  26. data/app/assets/stylesheets/module/_all.scss +0 -0
  27. data/app/assets/stylesheets/state/_all.scss +0 -0
  28. data/bin/crossbar +5 -0
  29. data/crossbar.gemspec +27 -0
  30. data/lib/crossbar.rb +6 -0
  31. data/lib/crossbar/generator.rb +61 -0
  32. data/lib/crossbar/version.rb +3 -0
  33. data/spec/crossbar_spec.rb +16 -0
  34. data/spec/fixtures/application.css.scss +4 -0
  35. data/spec/spec_helper.rb +3 -0
  36. metadata +156 -0
@@ -0,0 +1,5 @@
1
+ image,
2
+ picture {
3
+ margin: $b-image-margin;
4
+ max-width: 100%;
5
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ Typography
3
+
4
+ Table of content:
5
+ - Unordered list <ul> / Ordered list <ol>
6
+ - Definition list <dl>
7
+ */
8
+
9
+ ul,
10
+ ol {
11
+ margin: $b-ul-margin;
12
+ padding: $b-ul-padding;
13
+
14
+ &%list-reset {
15
+ list-style-type: none;
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+ }
20
+
21
+ // Definition list
22
+
23
+ dl {
24
+ margin-bottom: $b-dl-margin-bottom;
25
+
26
+ dt {
27
+ font-weight: $b-dt-font-weight;
28
+ margin-top: $b-dt-margin-top;
29
+ }
30
+
31
+ dd {
32
+ margin: 0;
33
+ }
34
+ }
@@ -0,0 +1,24 @@
1
+ table {
2
+ border-collapse: collapse;
3
+ margin: $b-table-margin;
4
+ table-layout: fixed;
5
+ width: 100%;
6
+ }
7
+
8
+ th {
9
+ border-bottom: $b-th-border-bottom;
10
+ font-weight: $b-font-weight-bold;
11
+ padding: $b-th-padding;
12
+ text-align: left;
13
+ }
14
+
15
+ td {
16
+ border-bottom: $b-td-border-bottom;
17
+ padding: $b-td-padding;
18
+ }
19
+
20
+ td,
21
+ th,
22
+ tr {
23
+ vertical-align: middle;
24
+ }
@@ -0,0 +1,106 @@
1
+ /*
2
+ Typography
3
+
4
+ Table of content:
5
+ - Scaffolding
6
+ - Hyperlink <a>
7
+ - Blockquote <blockquote>
8
+ - Cite <cite>
9
+ - Headers <h1> <h2> <h3> <h4> <h5> <h6>
10
+ - Horizontal line <hr>
11
+ - Paragraph <p>
12
+ */
13
+
14
+ // Scaffolding
15
+
16
+ body {
17
+ background-color: $b-background-color;
18
+ color: $b-font-color;
19
+ // font-family: $font-family-b;
20
+ font-family: $b-font-family;
21
+ font-feature-settings: $b-font-features;
22
+ font-size: $b-font-size;
23
+ -webkit-font-smoothing: antialiased;
24
+ line-height: $b-line-height;
25
+ }
26
+
27
+ // Hyperlink
28
+
29
+ a {
30
+ color: $b-link-color;
31
+ text-decoration: underline;
32
+ transition: color 125ms linear;
33
+
34
+ &:hover {
35
+ color: $b-link-color-hover;
36
+ text-decoration: none;
37
+ }
38
+
39
+ &:active,
40
+ &:focus {
41
+ color: $b-link-color-active;
42
+ outline: none;
43
+ text-decoration: none;
44
+ }
45
+ }
46
+
47
+ // Blockquote
48
+
49
+ blockquote {
50
+ border-left: $b-blockquote-border-left;
51
+ color: $b-blockquote-color;
52
+ font-family: $b-blockquote-font-family;
53
+ margin: $b-blockquote-margin;
54
+ padding: $b-blockquote-padding;
55
+ }
56
+
57
+ cite {
58
+ color: $b-cite-color;
59
+ font-style: $b-cite-font-style;
60
+ white-space: pre;
61
+
62
+ &:before {
63
+ content: '\A \2014 \00A0';
64
+ }
65
+ }
66
+
67
+ // Code
68
+ code {
69
+ font-family: $b-code-font-family;
70
+ font-size: $b-code-font-size;
71
+ -webkit-font-smoothing: antialiased;
72
+ }
73
+
74
+ // Headers
75
+
76
+ h1,
77
+ h2,
78
+ h3,
79
+ h4,
80
+ h5,
81
+ h6 {
82
+ line-height: $b-headers-line-height;
83
+ margin: 0 0 $b-spacing-half;
84
+ }
85
+
86
+ @each $header, $value in $b-headers-font-sizes {
87
+ #{$header} {
88
+ font-size: $value;
89
+ }
90
+ }
91
+
92
+ // Horizontal line
93
+
94
+ hr {
95
+ border-bottom: $b-hr-border;
96
+ border-left: 0;
97
+ border-right: 0;
98
+ border-top: 0;
99
+ margin: $b-hr-margin;
100
+ }
101
+
102
+ // Paragraph
103
+
104
+ p {
105
+ margin: $b-paragraph-margin;
106
+ }
File without changes
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Lighten a color
3
+ * @access public
4
+ * @param {Color} $color - color to tint
5
+ * @param {Number} $percentage - percentage of `$color` in returned color
6
+ * @return {Color}
7
+ */
8
+ @function tint($color, $percentage) {
9
+ @if type-of($color) != 'color' {
10
+ @warn "Color #{$color} is not a valid color";
11
+ }
12
+ @if $percentage < 0 or $percentage > 100 {
13
+ @warn "Percentage #{$percentage} must be between 0 and 100";
14
+ }
15
+ @return mix($color, white, (100 - $percentage));
16
+ }
17
+
18
+ /*
19
+ * Darken a color
20
+ * @access public
21
+ * @param {Color} $color - color to shade
22
+ * @param {Number} $percentage - percentage of `$color` in returned color
23
+ * @return {Color}
24
+ */
25
+ @function shade($color, $percentage) {
26
+ @if type-of($color) != 'color' {
27
+ @warn "Color #{$color} is not a valid color";
28
+ }
29
+ @if $percentage < 0 or $percentage > 100 {
30
+ @warn "Percentage #{$percentage} must be between 0 and 100";
31
+ }
32
+ @return mix($color, black, (100 - $percentage));
33
+ }
@@ -0,0 +1,10 @@
1
+ @function list-attributes($attributes-list) {
2
+ $list: ();
3
+
4
+ @each $attribute in $attributes-list {
5
+ $attribute: unquote($attribute);
6
+ $list: append($list, $attribute, comma);
7
+ }
8
+
9
+ @return $list;
10
+ }
File without changes
@@ -0,0 +1,23 @@
1
+
2
+ $black: rgba(0, 0, 0, 1);
3
+ $white: rgba(255, 255, 255, 1);
4
+
5
+ $black-level-1: rgba($black, 0.87);
6
+ $black-level-2: rgba($black, 0.54);
7
+ $black-level-3: rgba($black, 0.27);
8
+ $black-level-4: rgba($black, 0.12);
9
+
10
+ $gray-50: #fafafa;
11
+ $gray-100: #f5f5f5;
12
+ $gray-200: #eee;
13
+ $gray-300: #e0e0e0;
14
+ $gray-400: #bdbdbd;
15
+ $gray-500: #9e9e9e;
16
+ $gray-600: #757575;
17
+ $gray-700: #616161;
18
+ $gray-800: #424242;
19
+ $gray-900: #212121;
20
+
21
+ $blue: #328cc0;
22
+ $green: #3eb596;
23
+ $red: #f3585e;
File without changes
@@ -0,0 +1,22 @@
1
+ // Inputs
2
+
3
+ $b-text-inputs-list: 'input[type="text"]',
4
+ 'input[type="password"]';
5
+
6
+ $b-text-inputs-list-html5: 'input[type="color"]',
7
+ 'input[type="date"]',
8
+ 'input[type="datetime"]',
9
+ 'input[type="datetime-local"]',
10
+ 'input[type="email"]',
11
+ 'input[type="month"]',
12
+ 'input[type="number"]',
13
+ 'input[type="password"]',
14
+ 'input[type="search"]',
15
+ 'input[type="tel"]',
16
+ 'input[type="time"]',
17
+ 'input[type="url"]',
18
+ 'input[type="week"]';
19
+
20
+ $b-button-inputs-list: 'input[type="button"]',
21
+ 'input[type="reset"]',
22
+ 'input[type="submit"]';
@@ -0,0 +1,188 @@
1
+ // BASES
2
+ // =====
3
+
4
+ // Colors
5
+ $b-accent-color: $blue;
6
+ $b-background-color: $white;
7
+ $b-font-color: $black-level-1;
8
+ $b-link-color: $b-accent-color;
9
+ $b-link-color-hover: shade($b-link-color, 20);
10
+
11
+ // Font families
12
+ $sans: 'Helevetica Neue', 'Helvetica', 'Verdana', 'Arial', sans-serif;
13
+ $serif: 'Georgia', 'Cambria', 'Times', 'Times New Roman', serif;
14
+ $monospace: 'Menlo', 'Courier New', 'Courier', monospace;
15
+
16
+ $b-font-family: $sans;
17
+
18
+ // Font features
19
+ $b-font-features: 'kern', 'liga', 'frac', 'pnum';
20
+
21
+ // Font size
22
+ $b-font-size: 1rem;
23
+ $b-font-size-small: ($b-font-size * 0.75);
24
+
25
+ // Font weights
26
+ $b-font-weight-regular: 400;
27
+ $b-font-weight-medium: 500;
28
+ $b-font-weight-bold: 700;
29
+
30
+ $b-font-weight: $b-font-weight-regular;
31
+
32
+ // Line height
33
+ $b-line-height: 1.5;
34
+
35
+ // Spacing
36
+ $b-spacing: ($b-line-height * 1rem);
37
+ $b-spacing-half: ($b-spacing / 2);
38
+ $b-spacing-third: ($b-spacing / 3);
39
+ $b-spacing-fourth: ($b-spacing / 4);
40
+ $b-spacing-eighth: ($b-spacing / 8);
41
+
42
+ // Border
43
+ $b-border-color: $gray-300;
44
+ $b-border-size: 1px;
45
+ $b-border-style: solid;
46
+ $b-border: $b-border-size $b-border-style $b-border-color;
47
+
48
+ // TYPOGRAPHY
49
+ // =========
50
+
51
+ // Blockquote
52
+ $b-blockquote-border-left: medium solid $b-border-color;
53
+ $b-blockquote-color: $black-level-1;
54
+ $b-blockquote-font-family: $serif;
55
+ $b-blockquote-margin: $b-spacing 0;
56
+ $b-blockquote-padding: 0 0 0 $b-spacing-half;
57
+
58
+ // Cite;
59
+ $b-cite-color: $black-level-2;
60
+ $b-cite-font-style: italic;
61
+
62
+ // Code
63
+ $b-code-font-family: $monospace;
64
+ $b-code-font-size: $b-font-size-small;
65
+
66
+ // Headers
67
+ $b-h1-font-size: ($b-font-size * 2.25);
68
+ $b-h2-font-size: ($b-font-size * 2);
69
+ $b-h3-font-size: ($b-font-size * 1.75);
70
+ $b-h4-font-size: ($b-font-size * 1.5);
71
+ $b-h5-font-size: ($b-font-size * 1.25);
72
+ $b-h6-font-size: $b-font-size;
73
+
74
+ $b-headers-font-sizes: (h1: $b-h1-font-size,
75
+ h2: $b-h2-font-size,
76
+ h3: $b-h3-font-size,
77
+ h4: $b-h4-font-size,
78
+ h5: $b-h5-font-size,
79
+ h6: $b-h6-font-size);
80
+ $b-headers-line-height: 1.25;
81
+
82
+ // Horizontal line
83
+ $b-hr-border: 1px solid $black-level-4;
84
+ $b-hr-margin: $b-spacing 0;
85
+
86
+ // Hyperlink
87
+ $b-link-color: $b-accent-color;
88
+ $b-link-color-hover: shade($b-link-color, 20);
89
+ $b-link-color-active: shade($b-link-color, 40);
90
+
91
+ // Paragraph
92
+ $b-paragraph-margin: 0 0 $b-spacing-half;
93
+
94
+
95
+ // BUTTONS
96
+ // =======
97
+ $b-button-border: 0;
98
+ $b-button-border-radius: 0;
99
+ $b-button-color: $b-font-color;
100
+ $b-button-font-family: $sans;
101
+ $b-button-font-size: $b-font-size;
102
+ $b-button-padding: $b-spacing-half $b-spacing;
103
+
104
+ $button-pri-background-color: $b-accent-color;
105
+ $button-pri-background-color-hover: shade($button-pri-background-color, 20);
106
+ $button-pri-color: $white;
107
+ $button-pri-font-weight: $b-font-weight-bold;
108
+
109
+ $button-sec-background-color: $gray-300;
110
+ $button-sec-background-color-hover: shade($button-sec-background-color, 20);
111
+ $button-sec-color: $b-font-color;
112
+ $button-sec-font-weight: $b-font-weight-medium;
113
+
114
+ // FORM ELEMENTS
115
+ // =============
116
+
117
+ // Form
118
+ $b-form-font-family: $b-font-family;
119
+ $b-form-font-size: $b-font-size;
120
+
121
+ // Fieldset
122
+ $b-form-fieldset-background-color: $gray-50;
123
+ $b-form-fieldset-border: $b-border;
124
+ $b-form-fieldset-margin: 0 0 $b-spacing-half;
125
+ $b-form-fieldset-padding: $b-spacing;
126
+
127
+ $b-form-label-color: $black-level-2;
128
+ $b-form-label-font-weight: $b-font-weight-medium;
129
+ $b-form-label-margin: 0 0 $b-spacing-eighth;
130
+
131
+ // Form button input
132
+ $b-form-button-inputs: list-attributes($b-button-inputs-list);
133
+
134
+ // Form choice input (checkbox & radio)
135
+ $b-form-choice-input-margin: 0 $b-spacing-third 0 0;
136
+
137
+ // Form file input
138
+ $b-form-file-input-padding: 0 0 $b-spacing-half;
139
+
140
+ // Form select
141
+ $b-form-select-margin: 0 0 $b-spacing-half;
142
+
143
+ // Form text input
144
+ $b-form-text-inputs: list-attributes($b-text-inputs-list);
145
+ $b-form-text-inputs-html5: list-attributes($b-text-inputs-list-html5);
146
+
147
+ $b-form-text-input-background-color: $white;
148
+ $b-form-text-input-border-color: $gray-400;
149
+ $b-form-text-input-border-color-hover: $gray-700;
150
+ $b-form-text-input-border-color-focus: $b-accent-color;
151
+ $b-form-text-input-border-radius: 0;
152
+ $b-form-text-input-box-shadow: 0;
153
+ $b-form-text-input-color: $black-level-1;
154
+ $b-form-text-input-margin: 0 0 $b-spacing-half;
155
+ $b-form-text-input-padding: $b-spacing-half;
156
+
157
+ $b-form-text-input-placeholder-color: $black-level-3;
158
+
159
+ // IMAGES
160
+ // ======
161
+ $b-image-margin: 0;
162
+
163
+ // LIST
164
+ // ====
165
+
166
+ // Ordered & Unordered List
167
+ $b-ul-margin: 0 0 $b-spacing-half;
168
+ $b-ul-padding: 0 0 0 $b-spacing;
169
+
170
+ // Definition List
171
+ $b-dl-margin-bottom: $b-spacing-half;
172
+
173
+ $b-dt-font-weight: $b-font-weight-bold;
174
+ $b-dt-margin-top: $b-spacing-half;
175
+
176
+ // TABLES
177
+ // ======
178
+
179
+ // Table
180
+ $b-table-margin: $b-spacing-half 0;
181
+
182
+ // Table header
183
+ $b-th-border-bottom: medium solid shade($b-border-color, 15);
184
+ $b-th-padding: $b-spacing-half $b-spacing-fourth;
185
+
186
+ // Table division
187
+ $b-td-border-bottom: 1px solid shade($b-border-color, 15);
188
+ $b-td-padding: $b-spacing-half $b-spacing-fourth;