pusher-chameleon 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +23 -0
  5. data/README.md +17 -0
  6. data/docs/.gitignore +4 -0
  7. data/docs/Gemfile +10 -0
  8. data/docs/Gemfile.lock +72 -0
  9. data/docs/README.md +15 -0
  10. data/docs/Rakefile +40 -0
  11. data/docs/_config.production.yml +18 -0
  12. data/docs/_config.yml +39 -0
  13. data/docs/_includes/footer.html +38 -0
  14. data/docs/_includes/head.html +15 -0
  15. data/docs/_includes/header.html +27 -0
  16. data/docs/_includes/icon-github.html +1 -0
  17. data/docs/_includes/icon-github.svg +3 -0
  18. data/docs/_includes/logo-pusher.svg +4 -0
  19. data/docs/_includes/sidebar.html +33 -0
  20. data/docs/_layouts/default.html +53 -0
  21. data/docs/_layouts/page.html +14 -0
  22. data/docs/_layouts/post.html +15 -0
  23. data/docs/_plugins/chameleon_version.rb +11 -0
  24. data/docs/_plugins/copy_images_directory.rb +22 -0
  25. data/docs/_plugins/ext.rb +2 -0
  26. data/docs/_posts/2016-03-16-getting-started.md +28 -0
  27. data/docs/_posts/2016-03-16-introduction.md +24 -0
  28. data/docs/_posts/2016-03-17-buttons.md +61 -0
  29. data/docs/_posts/2016-03-17-colors.md +139 -0
  30. data/docs/_posts/2016-03-17-flex.md +24 -0
  31. data/docs/_posts/2016-03-17-forms.md +66 -0
  32. data/docs/_posts/2016-03-17-visibility.md +28 -0
  33. data/docs/_posts/2016-04-04-typography.md +111 -0
  34. data/docs/_posts/2016-04-05-syntax-highlighting.md +28 -0
  35. data/docs/_posts/2016-05-08-alerts.md +50 -0
  36. data/docs/_posts/2016-05-12-labels.md +22 -0
  37. data/docs/_posts/2016-05-13-tooltips.md +33 -0
  38. data/docs/_sass/_base.scss +36 -0
  39. data/docs/_sass/_chameleon_imports.scss +20 -0
  40. data/docs/_sass/_layout.scss +136 -0
  41. data/docs/_sass/_typography.scss +41 -0
  42. data/docs/_sass/layout/_aside.scss +151 -0
  43. data/docs/about.md +15 -0
  44. data/docs/autoprefixer.yml +4 -0
  45. data/docs/css/main.scss +11 -0
  46. data/docs/feed.xml +30 -0
  47. data/docs/index.html +23 -0
  48. data/images/ui_icons/alert_beta.svg +3 -0
  49. data/images/ui_icons/alert_info.svg +3 -0
  50. data/images/ui_icons/alert_tick.svg +6 -0
  51. data/images/ui_icons/alert_warning.svg +6 -0
  52. data/images/ui_icons/chevron_down.svg +3 -0
  53. data/images/ui_icons/github--active.svg +6 -0
  54. data/images/ui_icons/github.svg +6 -0
  55. data/images/ui_icons/google--active.svg +6 -0
  56. data/images/ui_icons/google.svg +10 -0
  57. data/images/ui_icons/plus.svg +3 -0
  58. data/javascripts/chameleon/code_box.js +14 -0
  59. data/javascripts/chameleon/pusher_featurette.js +52 -0
  60. data/javascripts/chameleon/pusher_text_cycler.js +60 -0
  61. data/lib/pusher-chameleon.rb +71 -0
  62. data/lib/pusher-chameleon/engine.rb +13 -0
  63. data/lib/pusher-chameleon/version.rb +8 -0
  64. data/package.json +24 -0
  65. data/pusher-chameleon.gemspec +21 -0
  66. data/stylesheets/.gitkeep +0 -0
  67. data/stylesheets/_base.scss +400 -0
  68. data/stylesheets/_global.scss +96 -0
  69. data/stylesheets/chameleon.scss +30 -0
  70. data/stylesheets/components/_alert.scss +102 -0
  71. data/stylesheets/components/_code_box.scss +84 -0
  72. data/stylesheets/components/_flex_aligners.scss +38 -0
  73. data/stylesheets/components/_label.scss +41 -0
  74. data/stylesheets/components/_signpost.scss +150 -0
  75. data/stylesheets/components/_spacers.scss +11 -0
  76. data/stylesheets/components/_statistic.scss +62 -0
  77. data/stylesheets/components/_tooltip.scss +65 -0
  78. data/stylesheets/components/_visibility.scss +117 -0
  79. data/stylesheets/forms/_base.scss +47 -0
  80. data/stylesheets/forms/_buttons.scss +242 -0
  81. data/stylesheets/forms/_checkbox.scss +31 -0
  82. data/stylesheets/forms/_field.scss +11 -0
  83. data/stylesheets/forms/_fieldset.scss +18 -0
  84. data/stylesheets/forms/_forms.scss +21 -0
  85. data/stylesheets/forms/_input.scss +14 -0
  86. data/stylesheets/forms/_range.scss +110 -0
  87. data/stylesheets/forms/_select.scss +15 -0
  88. data/stylesheets/forms/_textarea.scss +11 -0
  89. data/stylesheets/grid/_classes.scss +152 -0
  90. data/stylesheets/grid/_column.scss +126 -0
  91. data/stylesheets/grid/_flex-grid.scss +268 -0
  92. data/stylesheets/grid/_grid.scss +60 -0
  93. data/stylesheets/grid/_gutter.scss +34 -0
  94. data/stylesheets/grid/_layout.scss +51 -0
  95. data/stylesheets/grid/_position.scss +73 -0
  96. data/stylesheets/grid/_row.scss +95 -0
  97. data/stylesheets/grid/_size.scss +24 -0
  98. data/stylesheets/typography/_base.scss +60 -0
  99. data/stylesheets/typography/_helpers.scss +66 -0
  100. data/stylesheets/typography/_import.scss +54 -0
  101. data/stylesheets/typography/_syntax_highlighting.scss +168 -0
  102. data/stylesheets/typography/_syntax_highlighting_dark.scss +73 -0
  103. data/stylesheets/typography/_syntax_highlighting_light.scss +73 -0
  104. data/stylesheets/typography/_titles.scss +69 -0
  105. data/stylesheets/typography/_typography.scss +12 -0
  106. data/stylesheets/util/_breakpoint.scss +273 -0
  107. data/stylesheets/util/_color.scss +42 -0
  108. data/stylesheets/util/_flex.scss +68 -0
  109. data/stylesheets/util/_mixins.scss +233 -0
  110. data/stylesheets/util/_selector.scss +40 -0
  111. data/stylesheets/util/_unit.scss +90 -0
  112. data/stylesheets/util/_url_helper.scss +30 -0
  113. data/stylesheets/util/_util.scss +13 -0
  114. data/stylesheets/util/_value.scss +107 -0
  115. metadata +199 -0
@@ -0,0 +1,13 @@
1
+ module PusherChameleon
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+
5
+ initializer 'pusher-chameleon.assets.precompile' do |app|
6
+ %w(stylesheets javascripts images).each do |sub|
7
+ app.config.assets.paths << root.join(sub).to_s
8
+ end
9
+ end
10
+
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ require 'json'
2
+
3
+ module PusherChameleon
4
+ VERSION =
5
+ JSON.load(
6
+ File.open(
7
+ File.expand_path('../../../package.json', __FILE__)))['version']
8
+ end
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "pusher-chameleon",
3
+ "version": "1.0.3",
4
+ "description": "A collection of front-end patterns used across Pusher.",
5
+ "repository": "https://github.com/pusher/chameleon",
6
+ "keywords": [
7
+ "pattern",
8
+ "library",
9
+ "living",
10
+ "styleguide"
11
+ ],
12
+ "author": "Alex Pate",
13
+ "license": "MIT",
14
+ "files": [
15
+ "README.md",
16
+ "images",
17
+ "javascripts",
18
+ "stylesheets"
19
+ ],
20
+ "bugs": {
21
+ "url": "https://github.com/pusher/chameleon/issues"
22
+ },
23
+ "homepage": "https://github.com/pusher/chameleon#readme"
24
+ }
@@ -0,0 +1,21 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ require "pusher-chameleon/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "pusher-chameleon"
7
+ s.version = PusherChameleon::VERSION
8
+ s.summary = 'Pusher Chameleon front-end asset library'
9
+ s.description = 'Chameleon holds various front-end assets that are shared across our products'
10
+ s.authors = ['Alex Pate']
11
+ s.email = 'ap@pusher.com'
12
+ s.homepage = 'https://github.com/pusher/chameleon'
13
+ s.license = 'MIT'
14
+
15
+ s.add_dependency "sass", ">= 3.2.0"
16
+ s.add_development_dependency "gem_publisher", "1.3.1"
17
+ s.add_development_dependency "rake", "0.9.2.2"
18
+
19
+ s.require_paths = ["lib", "app"]
20
+ s.files = `git ls-files`.split($\) - %w(.gitignore docs gulpfile.js Rakefile)
21
+ end
File without changes
@@ -0,0 +1,400 @@
1
+ @mixin CHAMELEON-base {
2
+
3
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
4
+
5
+ /**
6
+ * 1. Set default font family to sans-serif.
7
+ * 2. Prevent iOS and IE text size adjust after device orientation change,
8
+ * without disabling user zoom.
9
+ */
10
+
11
+ html {
12
+ -ms-text-size-adjust: 100%; /* 2 */
13
+ -webkit-text-size-adjust: 100%; /* 2 */
14
+ }
15
+
16
+ /* HTML5 display definitions
17
+ ========================================================================== */
18
+
19
+ /**
20
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
21
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
22
+ * and Firefox.
23
+ * Correct `block` display not defined for `main` in IE 11.
24
+ */
25
+
26
+ article,
27
+ aside,
28
+ details,
29
+ figcaption,
30
+ figure,
31
+ footer,
32
+ header,
33
+ hgroup,
34
+ main,
35
+ menu,
36
+ nav,
37
+ section,
38
+ summary {
39
+ display: block;
40
+ }
41
+
42
+ /**
43
+ * 1. Correct `inline-block` display not defined in IE 8/9.
44
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
45
+ */
46
+
47
+ audio,
48
+ canvas,
49
+ progress,
50
+ video {
51
+ display: inline-block; /* 1 */
52
+ vertical-align: baseline; /* 2 */
53
+ }
54
+
55
+ /**
56
+ * Prevent modern browsers from displaying `audio` without controls.
57
+ * Remove excess height in iOS 5 devices.
58
+ */
59
+
60
+ audio:not([controls]) {
61
+ display: none;
62
+ height: 0;
63
+ }
64
+
65
+ /**
66
+ * Address `[hidden]` styling not present in IE 8/9/10.
67
+ * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
68
+ */
69
+
70
+ [hidden],
71
+ template {
72
+ display: none;
73
+ }
74
+
75
+ /* Links
76
+ ========================================================================== */
77
+
78
+ /**
79
+ * Remove the gray background color from active links in IE 10.
80
+ */
81
+
82
+ a {
83
+ background-color: transparent;
84
+ }
85
+
86
+ /**
87
+ * Improve readability of focused elements when they are also in an
88
+ * active/hover state.
89
+ */
90
+
91
+ a:active,
92
+ a:hover {
93
+ outline: 0;
94
+ }
95
+
96
+ /* Text-level semantics
97
+ ========================================================================== */
98
+
99
+ /**
100
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
101
+ */
102
+
103
+ abbr[title] {
104
+ border-bottom: 1px dotted;
105
+ }
106
+
107
+ /**
108
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
109
+ */
110
+
111
+ b,
112
+ strong {
113
+ font-weight: bold;
114
+ }
115
+
116
+ /**
117
+ * Address styling not present in Safari and Chrome.
118
+ */
119
+
120
+ dfn {
121
+ font-style: italic;
122
+ }
123
+
124
+ /**
125
+ * Address styling not present in IE 8/9.
126
+ */
127
+
128
+ mark {
129
+ background: #ff0;
130
+ color: #000;
131
+ }
132
+
133
+ /**
134
+ * Address inconsistent and variable font size in all browsers.
135
+ */
136
+
137
+ /**
138
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
139
+ */
140
+
141
+ sub,
142
+ sup {
143
+ font-size: 75%;
144
+ line-height: 0;
145
+ position: relative;
146
+ vertical-align: baseline;
147
+ }
148
+
149
+ sup {
150
+ top: -0.5em;
151
+ }
152
+
153
+ sub {
154
+ bottom: -0.25em;
155
+ }
156
+
157
+ /* Embedded content
158
+ ========================================================================== */
159
+
160
+ /**
161
+ * Remove border when inside `a` element in IE 8/9/10.
162
+ */
163
+
164
+ img {
165
+ border: 0;
166
+ }
167
+
168
+ /**
169
+ * Correct overflow not hidden in IE 9/10/11.
170
+ */
171
+
172
+ svg:not(:root) {
173
+ overflow: hidden;
174
+ }
175
+
176
+ /* Grouping content
177
+ ========================================================================== */
178
+
179
+ /**
180
+ * Address margin not present in IE 8/9 and Safari.
181
+ */
182
+
183
+ figure {
184
+ margin: 1em 40px;
185
+ }
186
+
187
+ /**
188
+ * Address differences between Firefox and other browsers.
189
+ */
190
+
191
+ hr {
192
+ box-sizing: content-box;
193
+ height: 0;
194
+ }
195
+
196
+ /**
197
+ * Contain overflow in all browsers.
198
+ */
199
+
200
+ pre {
201
+ overflow: auto;
202
+ }
203
+
204
+ /**
205
+ * Address odd `em`-unit font size rendering in all browsers.
206
+ */
207
+
208
+ code,
209
+ kbd,
210
+ pre,
211
+ samp {
212
+ font-family: monospace, monospace;
213
+ font-size: 1em;
214
+ }
215
+
216
+ /* Forms
217
+ ========================================================================== */
218
+
219
+ /**
220
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
221
+ */
222
+
223
+ button {
224
+ overflow: visible;
225
+ }
226
+
227
+ /**
228
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
229
+ * All other form control elements do not inherit `text-transform` values.
230
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
231
+ * Correct `select` style inheritance in Firefox.
232
+ */
233
+
234
+ button,
235
+ select {
236
+ text-transform: none;
237
+ }
238
+
239
+ /**
240
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
241
+ * and `video` controls.
242
+ * 2. Correct inability to style clickable `input` types in iOS.
243
+ * 3. Improve usability and consistency of cursor style between image-type
244
+ * `input` and others.
245
+ */
246
+
247
+ button,
248
+ html input[type="button"], /* 1 */
249
+ input[type="reset"],
250
+ input[type="submit"] {
251
+ -webkit-appearance: button; /* 2 */
252
+ cursor: pointer; /* 3 */
253
+ }
254
+
255
+ /**
256
+ * Re-set default cursor for disabled elements.
257
+ */
258
+
259
+ button[disabled],
260
+ html input[disabled] {
261
+ cursor: default;
262
+ }
263
+
264
+ /**
265
+ * Remove inner padding and border in Firefox 4+.
266
+ */
267
+
268
+ button::-moz-focus-inner,
269
+ input::-moz-focus-inner {
270
+ border: 0;
271
+ padding: 0;
272
+ }
273
+
274
+ /**
275
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
276
+ * the UA stylesheet.
277
+ */
278
+
279
+ input {
280
+ line-height: normal;
281
+ }
282
+
283
+ /**
284
+ * It's recommended that you don't attempt to style these elements.
285
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
286
+ *
287
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
288
+ * 2. Remove excess padding in IE 8/9/10.
289
+ */
290
+
291
+ input[type="checkbox"],
292
+ input[type="radio"] {
293
+ box-sizing: border-box; /* 1 */
294
+ padding: 0; /* 2 */
295
+ }
296
+
297
+ /**
298
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
299
+ * `font-size` values of the `input`, it causes the cursor style of the
300
+ * decrement button to change from `default` to `text`.
301
+ */
302
+
303
+ input[type="number"]::-webkit-inner-spin-button,
304
+ input[type="number"]::-webkit-outer-spin-button {
305
+ height: auto;
306
+ }
307
+
308
+ /**
309
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
310
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
311
+ */
312
+
313
+ input[type="search"] {
314
+ -webkit-appearance: textfield; /* 1 */
315
+ box-sizing: content-box; /* 2 */
316
+ }
317
+
318
+ /**
319
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
320
+ * Safari (but not Chrome) clips the cancel button when the search input has
321
+ * padding (and `textfield` appearance).
322
+ */
323
+
324
+ input[type="search"]::-webkit-search-cancel-button,
325
+ input[type="search"]::-webkit-search-decoration {
326
+ -webkit-appearance: none;
327
+ }
328
+
329
+
330
+ /**
331
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
332
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
333
+ */
334
+
335
+ legend {
336
+ border: 0; /* 1 */
337
+ padding: 0; /* 2 */
338
+ }
339
+
340
+ /**
341
+ * Remove default vertical scrollbar in IE 8/9/10/11.
342
+ */
343
+
344
+ textarea {
345
+ overflow: auto;
346
+ }
347
+
348
+ /**
349
+ * Don't inherit the `font-weight` (applied by a rule above).
350
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
351
+ */
352
+
353
+ optgroup {
354
+ font-weight: bold;
355
+ }
356
+
357
+ /* Tables
358
+ ========================================================================== */
359
+
360
+ /**
361
+ * Remove most spacing between table cells.
362
+ */
363
+
364
+ table {
365
+ border-collapse: collapse;
366
+ border-spacing: 0;
367
+ }
368
+
369
+ td,
370
+ th {
371
+ padding: 0;
372
+ }
373
+
374
+ *,
375
+ *:before,
376
+ *:after {
377
+ box-sizing: border-box;
378
+
379
+ @if($global-font-smoothing) {
380
+ -webkit-font-smoothing: antialiased;
381
+ -moz-osx-font-smoothing: grayscale;
382
+ }
383
+ }
384
+
385
+ html,
386
+ body {
387
+ @extend %font-family-secondary;
388
+ margin: 0;
389
+ padding: 0;
390
+ width: 100%;
391
+ min-height: 100%;
392
+ }
393
+
394
+ // Foundation MediaQuery Binder
395
+ // This is used to pass the media query sizes from CSS to JS
396
+
397
+ .foundation-mq {
398
+ font-family: '#{-zf-bp-serialize($breakpoints)}';
399
+ }
400
+ }