ethosstyles 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f93a29da7f695a2ad65f55ee9c4e3cdd9180bf54
4
- data.tar.gz: e2c313062cd88dfe7a0a33d7486751127c5ce2d6
2
+ SHA256:
3
+ metadata.gz: a0f4e2d43ab0a9c4a5caac96a0163627f002f0ddd934428c57e909c5a05509b8
4
+ data.tar.gz: 42accd98c144ac1df50232c1c7482bbfcee1534383dc491cdb5f9678b3e56f29
5
5
  SHA512:
6
- metadata.gz: ae358ace682be21f4a11212139e4dacde9c087fb739d653c82b407dfdda0977d9ccbf63c8dec7623d8d8ef7aa44168830fda6b96fd2f10ddfdd3c17134d8f9f7
7
- data.tar.gz: 38788a0b70659a9d2a5523ad29a4361984266838772f65267b970f9484300f75c83c5a59108cb77bd9e30d836cb2c2539e29ef85222bc109ee69a6bf0364ab57
6
+ metadata.gz: 0f020527884ea6b952db46677e887a3c29088b2601a8862f8ee9b72758c685d8d69a33a0df88c437ab89fa2ec607c3815e1219ce2d5ad5bb8bdd6853a2198356
7
+ data.tar.gz: c39396c4ca1b0641c71b7fa1860bdc9c9b7a1122961cbe31d57abee49720223214d6616ea618fc765b19d8fbb4386cf323a532f7871d40bea8f34a1c6e0ca5b1
@@ -25,3 +25,5 @@
25
25
  @import 'components/tables';
26
26
  @import 'components/timestamp';
27
27
  @import 'components/well';
28
+
29
+ @import 'pages/styleguide';
@@ -2,18 +2,24 @@
2
2
  // Buttons
3
3
  //
4
4
 
5
+ $btn-padding-y: 8px;
6
+ $btn-padding-x: $btn-padding-y * 1.8;
7
+
5
8
  .rf-btn,
9
+ .rf-btn[type="button"],
6
10
  %rf-btn {
11
+ -webkit-appearance: initial;
7
12
  border: 1px solid transparent;
8
13
  border-radius: $border-radius;
9
14
  cursor: pointer;
10
15
  display: inline-block;
11
16
  font-weight: bold;
12
- height: 32px;
13
- line-height: 30px;
14
- padding: 0 15px;
17
+ height: auto;
18
+ line-height: 1.1em;
19
+ padding: $btn-padding-y $btn-padding-x;
20
+ position: relative;
15
21
  text-align: center;
16
- text-decoration: none;
22
+ text-decoration: none !important;
17
23
  touch-action: manipulation;
18
24
  vertical-align: middle;
19
25
  white-space: nowrap;
@@ -21,9 +27,23 @@
21
27
 
22
28
  @include hocus {
23
29
  outline: none;
30
+ text-decoration: none !important;
24
31
  }
25
32
  }
26
33
 
34
+ // Side by side buttons
35
+
36
+ .rf-btn + .rf-btn {
37
+ margin-left: 8px;
38
+ }
39
+
40
+
41
+ //
42
+ // BUTTON TYPES
43
+ //
44
+
45
+ // PRIMARY
46
+
27
47
  .rf-btn--primary,
28
48
  %rf-btn--primary {
29
49
  background-color: $blue-bright;
@@ -34,10 +54,11 @@
34
54
  background-color: $navy;
35
55
  border-color: $navy;
36
56
  color: $white;
37
- text-decoration: none;
38
57
  }
39
58
  }
40
59
 
60
+ // SECONDARY
61
+
41
62
  .rf-btn--secondary,
42
63
  %rf-btn--secondary {
43
64
  background-color: $white;
@@ -45,30 +66,106 @@
45
66
  color: $charcoal;
46
67
 
47
68
  @include hocus {
48
- background-color: $prewhite;
69
+ background-color: $white;
70
+ border-color: $slate;
49
71
  color: $charcoal;
50
- text-decoration: none;
51
72
  }
52
73
  }
53
74
 
54
- .rf-btn--small {
55
- min-width: 100px;
75
+ // LINK
76
+
77
+ .rf-btn--link {
78
+ background-color: transparent;
79
+ border: 1px solid transparent;
80
+ color: $blue-bright;
81
+
82
+ @include hocus {
83
+ background-color: transparent;
84
+ border: 1px solid transparent;
85
+ color: $navy;
86
+ }
56
87
  }
57
88
 
89
+ // DROPDOWN
90
+
91
+ .rf-btn--dropdown {
92
+ @extend %rf-btn--secondary;
93
+ font-weight: 400;
94
+
95
+ &:after {
96
+ content: "\f0d7";
97
+ display: inline-block;
98
+ font-family: $font-icon-f;
99
+ font-size: .8em;
100
+ line-height: 1em;
101
+ margin-left: 7px;
102
+ }
103
+ }
104
+
105
+ // WARNING
106
+
107
+ .rf-btn--warning {
108
+ background-color: $gold;
109
+ border-color: $gold;
110
+ color: $white;
111
+
112
+ @include hocus {
113
+ background-color: $dandelion;
114
+ border-color: $dandelion;
115
+ color: $white;
116
+ }
117
+
118
+ // Warning icon
119
+
120
+ &:before {
121
+ color: $white;
122
+ content: "\f071";
123
+ display: inline-block;
124
+ font-family: $font-icon-f;
125
+ font-size: 1em;
126
+ line-height: .6em;
127
+ margin-right: 4px;
128
+ }
129
+ }
130
+
131
+ // ERROR
132
+
133
+ .rf-btn--error {
134
+ background-color: $red;
135
+ border: 1px solid $red;
136
+ color: $white;
137
+
138
+ @include hocus {
139
+ background-color: $crimson;
140
+ border-color: $crimson;
141
+ color: $white;
142
+ }
143
+ }
144
+
145
+
146
+ //
147
+ // BUTTON SIZES
148
+ //
149
+
58
150
  .rf-btn--large,
59
151
  %rf-btn--large {
60
152
  font-size: 18px;
61
- height: 44px;
153
+ height: 50px;
62
154
  min-width: 90px;
155
+ padding: ($btn-padding-y*1.7) ($btn-padding-x*1.7);
63
156
  }
64
157
 
65
- .rf-btn--xs {
158
+ .rf-btn--small {
66
159
  font-size: 11px;
67
- height: 24px;
68
- line-height: 14px;
69
- padding: 0px 6px;
160
+ min-width: 50px;
161
+ padding: ($btn-padding-y*.5) ($btn-padding-x*.5);
70
162
  }
71
163
 
164
+
165
+ //
166
+ // BUTTON HELPERS
167
+ //
168
+
72
169
  // Disabled
73
170
 
74
171
  .rf-btn--disabled,
@@ -78,18 +175,45 @@
78
175
  pointer-events: none;
79
176
  }
80
177
 
81
- // Side by side buttons
178
+ // Hiding button
179
+ // A button that hides when more info is expanded
82
180
 
83
- .rf-btn + .rf-btn {
84
- margin-left: 4px;
181
+ .rf-btn--tohide[aria-expanded='true'] {
182
+ display: none;
85
183
  }
86
184
 
185
+ // Multiline button
186
+ // Smaller padding for more text
87
187
 
88
- //
89
- // ERROR BUTTON (should not click)
90
- //
188
+ .rf-btn--multiline {
189
+ padding: ($btn-padding-y*.8) $btn-padding-x;
91
190
 
92
- .rf-btn--error {
191
+ &.rf-btn--small {
192
+ padding: ($btn-padding-y*.3) ($btn-padding-x*.5);
193
+ }
194
+
195
+ &.rf-btn--large {
196
+ padding: ($btn-padding-y*.8) ($btn-padding-x*1.4);
197
+
198
+ .rf-btn__text {
199
+ font-size: 13px;
200
+ line-height: 1.2em;
201
+ }
202
+ }
203
+
204
+ // Small text beneath main text
205
+
206
+ .rf-btn__text {
207
+ display: block;
208
+ font-weight: 400;
209
+ margin: auto;
210
+ }
211
+ }
212
+
213
+ // Error hover
214
+ // Only looks like an error button on hover
215
+
216
+ .rf-btn--errorhover {
93
217
  @include hocus() {
94
218
  background-color: $red;
95
219
  border: 1px solid $red;
@@ -97,11 +221,9 @@
97
221
  }
98
222
  }
99
223
 
100
-
101
- //
102
- // LIGHT BUTTON
224
+ // Light button
103
225
  // For use on top of dark backgrounds
104
- //
226
+ // Only works with secondary and dropdown types
105
227
 
106
228
  .rf-btn--light {
107
229
  background-color: rgba(255,255,255, .3);
@@ -115,3 +237,77 @@
115
237
  }
116
238
  }
117
239
 
240
+
241
+ //
242
+ // BUTTON ASSOCIATES
243
+ //
244
+
245
+ // Helper text associated with button
246
+
247
+ .rf-btn__helpertext {
248
+ font-size: 12px;
249
+ height: 20px;
250
+ margin-bottom: 0;
251
+ width: 100%;
252
+ }
253
+
254
+ // Button wrapper
255
+ // Used for tooltips and alignment
256
+
257
+ .rf-btn__wrapper {
258
+ display: block;
259
+ }
260
+
261
+ .rf-btn__wrapper + .rf-btn__wrapper {
262
+ margin-left: 8px;
263
+ }
264
+
265
+
266
+ //
267
+ // BUTTON GROUPINGS
268
+ //
269
+
270
+ // BUTTON GROUP
271
+ // For groups of buttons that touch each other
272
+
273
+ .rf-btn-group {
274
+ > .rf-btn {
275
+ border-radius: 0;
276
+ display: block;
277
+ float: left;
278
+ margin-left: -2px;
279
+ width: auto;
280
+ }
281
+
282
+ > .rf-btn:first-of-type {
283
+ border-radius: $border-radius 0 0 $border-radius;
284
+ }
285
+
286
+ > .rf-btn:last-of-type {
287
+ border-radius: 0 $border-radius $border-radius 0;
288
+ }
289
+
290
+ // Remove border color change on hover because the borders
291
+ // are problematic w/ the negative margin left
292
+
293
+ .rf-btn--secondary {
294
+ @include hocus() {
295
+ background-color: $prewhite;
296
+ border-color: $cloudy;
297
+ }
298
+ }
299
+ }
300
+
301
+ // BUTTON SET
302
+ // Fills up given area w/ buttons
303
+
304
+ .rf-btn-set {
305
+ display: flex;
306
+ width: 100%;
307
+
308
+ .rf-btn {
309
+ flex-grow: 1;
310
+ padding-left: 4px;
311
+ padding-right: 4px;
312
+ }
313
+ }
@@ -0,0 +1,14 @@
1
+ //
2
+ // STYLEGUIDE/TESTING
3
+ //
4
+
5
+ // Dark background
6
+
7
+ .rf-sg--dark {
8
+ background-color: $charcoal;
9
+ padding: 20px;
10
+
11
+ h2 {
12
+ color: $white;
13
+ }
14
+ }
@@ -12,8 +12,10 @@ $stormy: #c0c0c0;
12
12
  $mercury: #e8e8e8;
13
13
  $cloudy: #dadada;
14
14
  $prewhite: #f3f3f3;
15
+ $lighterprewhite: #f9f9f9;
15
16
 
16
- $gold: #d2c53b;
17
+ $gold: #ebc30a;
18
+ $dandelion: #e7b707;
17
19
  $lemon: #ffea00;
18
20
  $sunshine: #fffde1;
19
21
 
@@ -21,6 +23,7 @@ $green: #04ac00;
21
23
  $mint: #e7f9e6;
22
24
 
23
25
  $red: #d9534f;
26
+ $crimson: #CC3030;
24
27
 
25
28
  $navy: #002c82;
26
29
  $blue-bright: #0057ff;
@@ -0,0 +1,105 @@
1
+ <h1>BUTTON</h1>
2
+
3
+ <section class="rf-section">
4
+
5
+ <h2>BUTTON TYPES</h2>
6
+
7
+ <a href="#" class="rf-btn rf-btn--primary">Primary</a>
8
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
9
+ <a href="#" class="rf-btn rf-btn--link">Link</a>
10
+ <a href="#" class="rf-btn rf-btn--dropdown">Dropdown</a>
11
+ <a href="#" class="rf-btn rf-btn--warning">Warning</a>
12
+ <a href="#" class="rf-btn rf-btn--error">Error</a>
13
+ </section>
14
+
15
+ <section class="rf-section">
16
+
17
+ <h2>BUTTON SIZES</h2>
18
+
19
+ <a href="#" class="rf-btn rf-btn--small">Button</a>
20
+ <a href="#" class="rf-btn rf-btn--large">Button</a>
21
+ <br/><br/><br/>
22
+
23
+ <h3>Types + sizes </h3>
24
+
25
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--large">Primary</a>
26
+ <a href="#" class="rf-btn rf-btn--warning rf-btn--large">Secondary</a>
27
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--large">Button</a>
28
+ <a href="#" class="rf-btn rf-btn--link rf-btn--large">Link</a>
29
+ <a href="#" class="rf-btn rf-btn--dropdown rf-btn--large">Dropdown</a>
30
+ <a href="#" class="rf-btn rf-btn--error rf-btn--large">Error</a>
31
+ <br/><br/><br/>
32
+
33
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--small">Button</a>
34
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--small">Button</a>
35
+ <a href="#" class="rf-btn rf-btn--warning rf-btn--small">Button</a>
36
+ <a href="#" class="rf-btn rf-btn--link rf-btn--small">Link</a>
37
+ <a href="#" class="rf-btn rf-btn--dropdown rf-btn--small">Dropdown</a>
38
+ <a href="#" class="rf-btn rf-btn--error rf-btn--small">Error</a>
39
+ </section>
40
+
41
+ <section class="rf-section">
42
+ <h2>BUTTON HELPERS</h2>
43
+
44
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--disabled">Disabled</a>
45
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--errorhover">Error Hover</a>
46
+ <br/><br/><br/>
47
+
48
+ <div class="rf-sg--dark">
49
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--light">Button</a>
50
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--large rf-btn--light">Button</a>
51
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--small rf-btn--light">Button</a>
52
+ <a href="#" class="rf-btn rf-btn--dropdown rf-btn--light">Dropdown</a>
53
+ </div>
54
+ <br/><br/><br/>
55
+
56
+ <h3>Multiline buttons</h3>
57
+
58
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--large rf-btn--multiline">
59
+ Primary
60
+ <small class="rf-btn__text">Extra line of text</small>
61
+ </a>
62
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--large">
63
+ Secondary
64
+ </a>
65
+ </section>
66
+
67
+ <section class="rf-section">
68
+
69
+ <h2>BUTTON GROUPINGS</h2>
70
+ <br/>
71
+ <h3>Button Group</h3>
72
+
73
+ <div class="rf-btn-group">
74
+ <a href="#" class="rf-btn rf-btn--primary rf-btn--large">Primary</a>
75
+ <a href="#" class="rf-btn rf-btn--warning rf-btn--large">Secondary</a>
76
+ <a href="#" class="rf-btn rf-btn--secondary rf-btn--large">Button</a>
77
+ <a href="#" class="rf-btn rf-btn--dropdown rf-btn--large">Dropdown</a>
78
+ <a href="#" class="rf-btn rf-btn--error rf-btn--large">Error</a>
79
+ </div>
80
+ <br/><br/><br/><br/>
81
+
82
+ <h3>Button Set</h3>
83
+ <div class="rf-col--2">
84
+ <div class="rf-btn-set">
85
+ <a href="#" class="rf-btn rf-btn--primary">Primary</a>
86
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
87
+ </div>
88
+ </div>
89
+ <br/>
90
+ <div class="rf-col--8">
91
+ <div class="rf-btn-set">
92
+ <a href="#" class="rf-btn rf-btn--primary">Primary</a>
93
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
94
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
95
+ </div>
96
+ </div>
97
+ <br/>
98
+ <div class="rf-col--1">
99
+ <div class="rf-btn-set">
100
+ <a href="#" class="rf-btn rf-btn--primary">Primary</a>
101
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
102
+ <a href="#" class="rf-btn rf-btn--secondary">Secondary</a>
103
+ </div>
104
+ </div>
105
+ </section>
@@ -1,3 +1,3 @@
1
1
  module Ethosstyles
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethosstyles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-04 00:00:00.000000000 Z
11
+ date: 2018-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: aruba
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: Ethos Styles
@@ -73,7 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - README.md
79
79
  - Rakefile
@@ -97,12 +97,14 @@ files:
97
97
  - app/assets/stylesheets/components/_tables.scss
98
98
  - app/assets/stylesheets/components/_timestamp.scss
99
99
  - app/assets/stylesheets/components/_well.scss
100
+ - app/assets/stylesheets/pages/_styleguide.scss
100
101
  - app/assets/stylesheets/settings/_test.scss
101
102
  - app/assets/stylesheets/settings/_variables.scss
102
103
  - app/assets/stylesheets/utilities/_animations.scss
103
104
  - app/assets/stylesheets/utilities/_mixins.scss
104
105
  - app/assets/stylesheets/utilities/_shame.scss
105
106
  - app/assets/stylesheets/utilities/_utilities.scss
107
+ - app/views/buttons.html
106
108
  - ethosstyles.gemspec
107
109
  - lib/ethosstyles.rb
108
110
  - lib/ethosstyles/engine.rb
@@ -117,17 +119,17 @@ require_paths:
117
119
  - lib
118
120
  required_ruby_version: !ruby/object:Gem::Requirement
119
121
  requirements:
120
- - - '>='
122
+ - - ">="
121
123
  - !ruby/object:Gem::Version
122
124
  version: '0'
123
125
  required_rubygems_version: !ruby/object:Gem::Requirement
124
126
  requirements:
125
- - - '>='
127
+ - - ">="
126
128
  - !ruby/object:Gem::Version
127
129
  version: '0'
128
130
  requirements: []
129
131
  rubyforge_project: ethosstyles
130
- rubygems_version: 2.0.14.1
132
+ rubygems_version: 2.7.2
131
133
  signing_key:
132
134
  specification_version: 4
133
135
  summary: Ethos Styles