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,31 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Checkbox
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-checkbox {
6
+ input[type="checkbox"] {
7
+ width: 20px;
8
+ height: 20px;
9
+ position: relative;
10
+ margin: 2px 0;
11
+ border: 1px solid $color-smoke;
12
+ border-radius: $border-radius;
13
+ appearance: none;
14
+
15
+ &:checked {
16
+ background: transparent url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjExcHgiIGhlaWdodD0iOHB4IiB2aWV3Qm94PSIwIDAgMTEgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICA8ZyBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGQ9Ik01LjIwODcxNzI3LDcuMjA3OTE1NTYgQzUuMDEyNjk3ODIsNy40MDE5MzQ4MSA0Ljc1NDY3MjIyLDcuNDk5OTQ0NTQgNC41MDA2NDcwMSw3LjQ5OTk0NDU0IEM0LjI0MjYyMTQxLDcuNDk5OTQ0NTQgMy45ODg1OTYyLDcuNDAxOTM0ODEgMy43OTI1NzY3NSw3LjIwNzkxNTU2IEwwLjc5MjI3OTAyOCw0LjIwNzYxNzg0IEMwLjQwMjI0MDMyNCwzLjgxNzU3OTEzIDAuNDAyMjQwMzI0LDMuMTgzNTE2MjEgMC43OTIyNzkwMjgsMi43OTM0Nzc1MSBDMS4xODIzMTc3MywyLjQwMzQzODgxIDEuODE2MzgwNjUsMi40MDM0Mzg4MSAyLjIwNjQxOTM1LDIuNzkzNDc3NTEgTDQuNDk4NjQ2ODEsNS4wODU3MDQ5NyBMOC43OTEwNzI3NSwwLjc5MzI3OTAyOCBDOS4xODExMTE0NiwwLjQwMzI0MDMyNCA5LjgxNTE3NDM4LDAuNDAzMjQwMzI0IDEwLjIwNTIxMzEsMC43OTMyNzkwMjggQzEwLjU5NTI1MTgsMS4xODMzMTc3MyAxMC41OTkyNTIyLDEuODE1MzgwNDUgMTAuMjA5MjEzNSwyLjIwNzQxOTM1IEw1LjIwODcxNzI3LDcuMjA3OTE1NTYgWiIgZmlsbD0iIzU0OWVmZiI+PC9wYXRoPgogIDwvZz4KPC9zdmc+') no-repeat center center;
17
+ border: 1px solid $color-primary;
18
+ }
19
+
20
+ &:focus {
21
+ outline: 0;
22
+ }
23
+
24
+ + label {
25
+ position: relative;
26
+ display: inline-block;
27
+ top: -7px;
28
+ padding-left: 10px;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,11 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Text Field
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-field {
6
+ .form__field {
7
+ width: 100%;
8
+ position: relative;
9
+ margin: 10px 0;
10
+ }
11
+ }
@@ -0,0 +1,18 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Groups
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-fieldset {
6
+ .fieldset {
7
+ overflow: auto;
8
+ border: 0;
9
+ padding: 0;
10
+ margin: 0;
11
+
12
+ input,
13
+ button {
14
+ float: left;
15
+ width: auto;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ @import 'base';
2
+
3
+ @import 'buttons';
4
+ @import 'field';
5
+ @import 'fieldset';
6
+ @import 'range';
7
+ @import 'select';
8
+ @import 'input';
9
+ @import 'textarea';
10
+ @import 'checkbox';
11
+
12
+ @mixin CHAMELEON-forms {
13
+ @include CHAMELEON-forms-buttons;
14
+ @include CHAMELEON-forms-field;
15
+ @include CHAMELEON-forms-fieldset;
16
+ @include CHAMELEON-forms-range;
17
+ @include CHAMELEON-forms-select;
18
+ @include CHAMELEON-forms-input;
19
+ @include CHAMELEON-forms-textarea;
20
+ @include CHAMELEON-forms-checkbox;
21
+ }
@@ -0,0 +1,14 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Text Input
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-input {
6
+ input[type="text"],
7
+ input[type="email"],
8
+ input[type="password"],
9
+ input[type="url"],
10
+ input[type="search"],
11
+ input[type="phone"] {
12
+ @include base-input();
13
+ }
14
+ }
@@ -0,0 +1,110 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Range Field
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-range {
6
+ input[type="range"] {
7
+ -webkit-appearance: none;
8
+ width: 100%;
9
+
10
+ &:focus {
11
+ outline: none;
12
+ }
13
+
14
+ %track {
15
+ background-color: darken(#f4f7f9, 25%);
16
+ border-radius: 5px;
17
+ cursor: pointer;
18
+ height: 6px;
19
+ transition: all 200ms ease-in-out;
20
+ width: 100%;
21
+ }
22
+
23
+ %thumb {
24
+ background: #fff;
25
+ border-radius: 50%;
26
+ border: 1px solid darken(#f4f7f9, 20%);
27
+ cursor: pointer;
28
+ height: 20px;
29
+ width: 20px;
30
+ }
31
+
32
+ &::-moz-range-track {
33
+ background-color: darken(#fff, 25%);
34
+ border-radius: 5px;
35
+ cursor: pointer;
36
+ height: 6px;
37
+ transition: all 200ms ease-in-out;
38
+ width: 100%;
39
+ }
40
+
41
+ &::-webkit-slider-runnable-track {
42
+ background-color: darken(#fff, 25%);
43
+ border-radius: 5px;
44
+ cursor: pointer;
45
+ height: 6px;
46
+ transition: all 200ms ease-in-out;
47
+ width: 100%;
48
+ }
49
+
50
+ &:focus::-webkit-slider-runnable-track {
51
+ background: darken(#a1b4c2, 5%);
52
+ }
53
+
54
+ &::-ms-track {
55
+ background: transparent;
56
+ border-color: transparent;
57
+ border-width: 30px 0;
58
+ color: transparent;
59
+ cursor: pointer;
60
+ height: 10px;
61
+ transition: all 200ms ease-in-out;
62
+ width: 100%;
63
+ }
64
+
65
+ &::-ms-fill-lower,
66
+ &::-ms-fill-upper {
67
+ box-shadow: 2px 2px 2px #222;
68
+ background: darken(#424242, 5%);
69
+ border: 1px solid #000;
70
+ border-radius: 5px * 2;
71
+ }
72
+
73
+ &::-ms-thumb {
74
+ background: #fff;
75
+ border-radius: 50%;
76
+ border: 1px solid darken(#f4f7f9, 20%);
77
+ cursor: pointer;
78
+ height: 20px;
79
+ width: 20px;
80
+ }
81
+
82
+ &::-moz-range-thumb {
83
+ background: #fff;
84
+ border-radius: 50%;
85
+ border: 1px solid darken(#f4f7f9, 20%);
86
+ cursor: pointer;
87
+ height: 20px;
88
+ width: 20px;
89
+ }
90
+
91
+ &::-webkit-slider-thumb {
92
+ background: #fff;
93
+ border-radius: 50%;
94
+ border: 1px solid darken(#f4f7f9, 20%);
95
+ cursor: pointer;
96
+ height: 20px;
97
+ width: 20px;
98
+ -webkit-appearance: none;
99
+ margin-top: -8px;
100
+ }
101
+
102
+ &:focus::-ms-fill-lower {
103
+ background: #424242;
104
+ }
105
+
106
+ &:focus::-ms-fill-upper {
107
+ background: lighten(#424242, 5%);
108
+ }
109
+ }
110
+ }
@@ -0,0 +1,15 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Select Input
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-select {
6
+ select {
7
+ @include base-input();
8
+
9
+ background-color: #fff;
10
+ background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjEwcHgiIGhlaWdodD0iNnB4IiB2aWV3Qm94PSIwIDAgMTAgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuNC4xICgxNTY4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+YW5nbGU8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4KICAgICAgICA8ZyBpZD0iYW5nbGUiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIGZpbGw9IiMwMDAwMDAiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTEiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYuODYxOTE1LCAyLjg2MTkxNSkgcm90YXRlKC00NS4wMDAwMDApIHRyYW5zbGF0ZSgtNi44NjE5MTUsIC0yLjg2MTkxNSkgIiB4PSIzLjQ0MjE4ODEiIHk9IjIuMjM0MjgyOSIgd2lkdGg9IjYuODM5NDUzODEiIGhlaWdodD0iMS4yNTUyNjQyMSI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTEtQ29weS0yIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyLjg2MTkxNSwgMi44NjE5MTUpIHJvdGF0ZSgtMzE1LjAwMDAwMCkgdHJhbnNsYXRlKC0yLjg2MTkxNSwgLTIuODYxOTE1KSAiIHg9Ii0wLjU1NzgxMTkwNCIgeT0iMi4yMzQyODI5IiB3aWR0aD0iNi44Mzk0NTM4MSIgaGVpZ2h0PSIxLjI1NTI2NDIxIj48L3JlY3Q+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=");
11
+ background-position: calc(100% - 10px) center;
12
+ background-repeat: no-repeat;
13
+ padding: 2px 20px 2px 10px;
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Form Textarea
3
+ // - - - - - - - - - - - - - - - - - - - - - - - - -
4
+
5
+ @mixin CHAMELEON-forms-textarea {
6
+ textarea {
7
+ @include base-input();
8
+ height: auto;
9
+ min-height: 240px;
10
+ }
11
+ }
@@ -0,0 +1,152 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Outputs CSS classes for the grid.
10
+ /// @access private
11
+ @mixin CHAMELEON-grid(
12
+ $row: 'grid',
13
+ $column: 'grid__columns',
14
+ $column-row: 'column-row',
15
+ $push: 'push',
16
+ $pull: 'pull',
17
+ $center: 'centered',
18
+ $uncenter: 'uncentered',
19
+ $collapse: 'collapse',
20
+ $uncollapse: 'uncollapse',
21
+ $offset: 'offset',
22
+ $end: 'end',
23
+ $expanded: 'expanded',
24
+ $class-prefix: 'grid__',
25
+ $class-modifier: 'grid--'
26
+ ) {
27
+ // Row
28
+ .#{$row} {
29
+ @include grid-row;
30
+
31
+ // Collapsing
32
+ &.#{$class-modifier}#{$collapse} {
33
+ > .#{$column} {
34
+ @include grid-col-collapse;
35
+ }
36
+ }
37
+
38
+ // Nesting
39
+ & & {
40
+ @include grid-row-nest($grid-column-gutter);
41
+
42
+ &.#{$class-modifier}#{$collapse} {
43
+ margin-left: 0;
44
+ margin-right: 0;
45
+ }
46
+ }
47
+
48
+ // Expanded (full-width) row
49
+ &.#{$class-modifier}#{$expanded} {
50
+ max-width: none;
51
+
52
+ .#{$row} {
53
+ margin-left: auto;
54
+ margin-right: auto;
55
+ }
56
+ }
57
+ }
58
+
59
+ // Column
60
+ .#{$column} {
61
+ @include grid-col;
62
+
63
+ @if $grid-column-align-edge {
64
+ &.#{$class-modifier}#{$end} {
65
+ @include grid-col-end;
66
+ }
67
+ }
68
+ }
69
+
70
+ // Column row
71
+ // The double .row class is needed to bump up the specificity
72
+ .#{$column}.#{$row}.#{$row} {
73
+ float: none;
74
+
75
+ // To properly nest a column row, padding and margin is removed
76
+ .#{$row} & {
77
+ padding-left: 0;
78
+ padding-right: 0;
79
+ margin-left: 0;
80
+ margin-right: 0;
81
+ }
82
+ }
83
+
84
+ @include -zf-each-breakpoint {
85
+ @for $i from 1 through $grid-column-count {
86
+ // Column width
87
+ .#{$class-prefix}#{$-zf-size}-#{$i} {
88
+ @include grid-col-size($i);
89
+ }
90
+
91
+ // Source ordering
92
+ @if $i < $grid-column-count {
93
+ .#{$class-prefix}#{$-zf-size}-#{$push}-#{$i} {
94
+ @include grid-col-pos($i);
95
+ }
96
+
97
+ .#{$class-prefix}#{$-zf-size}-#{$pull}-#{$i} {
98
+ @include grid-col-pos(-$i);
99
+ }
100
+ }
101
+
102
+ // Offsets
103
+ $o: $i - 1;
104
+
105
+ .#{$class-prefix}#{$-zf-size}-#{$offset}-#{$o} {
106
+ @include grid-col-off($o);
107
+ }
108
+ }
109
+
110
+ // Block grid
111
+ @for $i from 1 through $block-grid-max {
112
+ .#{$class-prefix}#{$-zf-size}-up-#{$i} {
113
+ @include grid-layout($i, ".#{$column}");
114
+ }
115
+ }
116
+
117
+ // Responsive collapsing
118
+ .#{$class-prefix}#{$-zf-size}-#{$collapse} {
119
+ > .#{$column} { @include grid-col-collapse; }
120
+
121
+ .#{$row} {
122
+ margin-left: 0;
123
+ margin-right: 0;
124
+ }
125
+ }
126
+
127
+ .#{$class-prefix}#{$-zf-size}-#{$uncollapse} {
128
+ $gutter: -zf-get-bp-val($grid-column-gutter, $-zf-size);
129
+
130
+ > .#{$column} { @include grid-col-uncollapse($gutter); }
131
+ }
132
+
133
+ // Positioning
134
+ .#{$class-prefix}#{$-zf-size}-#{$center} {
135
+ @include grid-col-pos(center);
136
+ }
137
+
138
+ // Gutter adjustment
139
+ .#{$class-prefix}#{$-zf-size}-#{$uncenter},
140
+ .#{$class-prefix}#{$-zf-size}-#{$push}-0,
141
+ .#{$class-prefix}#{$-zf-size}-#{$pull}-0 {
142
+ @include grid-col-unpos;
143
+ }
144
+ }
145
+
146
+ @if $column == 'column' {
147
+ .columns {
148
+ // scss-lint:disable PlaceholderInExtend
149
+ @extend .column;
150
+ }
151
+ }
152
+ }
@@ -0,0 +1,126 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Calculates the width of a column based on a number of factors.
10
+ ///
11
+ /// @param {Number|List} $columns
12
+ /// Width of the column. Accepts multiple values:
13
+ /// - A percentage value will make the column that exact size.
14
+ /// - A single digit will make the column span that number of columns wide, taking into account the column count of the parent row.
15
+ /// - A string of the format "x of y" will make a column that is *x* columns wide, assuming *y* total columns for the parent.
16
+ ///
17
+ /// @returns {Number} A calculated percentage value.
18
+ @function grid-column($columns) {
19
+ $width: 0%;
20
+
21
+ // Parsing percents, decimals, and column counts
22
+ @if type-of($columns) == 'number' {
23
+ @if unit($columns) == '%' {
24
+ $width: $columns;
25
+ }
26
+ @else if $columns < 1 {
27
+ $width: percentage($columns);
28
+ }
29
+ @else {
30
+ $width: percentage($columns / $grid-column-count);
31
+ }
32
+ }
33
+
34
+ // Parsing "n of n" expressions
35
+ @else if type-of($columns) == 'list' {
36
+ @if length($columns) != 3 {
37
+ @error 'Wrong syntax for grid-column(). Use the format "n of n".';
38
+ }
39
+ @else {
40
+ $width: percentage(nth($columns, 1) / nth($columns, 3));
41
+ }
42
+ }
43
+
44
+ // Anything else is incorrect
45
+ @else {
46
+ @error 'Wrong syntax for grid-column(). Use a number, decimal, percentage, or "n of n".';
47
+ }
48
+
49
+ @return $width;
50
+ }
51
+
52
+ /// Creates a grid column.
53
+ ///
54
+ /// @param {Mixed} $columns [$grid-column-count] - Width of the column. Refer to the `grid-column()` function to see possible values.
55
+ /// @param {Number} $gutter [$grid-column-gutter] - Spacing between columns.
56
+ @mixin grid-column(
57
+ $columns: $grid-column-count,
58
+ $gutter: $grid-column-gutter
59
+ ) {
60
+ @include grid-column-size($columns);
61
+ float: $global-left;
62
+
63
+ // Gutters
64
+ @if type-of($gutter) == 'map' {
65
+ @each $breakpoint, $value in $gutter {
66
+ $padding: rem-calc($value) / 2;
67
+
68
+ @include breakpoint($breakpoint) {
69
+ padding-left: $padding;
70
+ padding-right: $padding;
71
+ }
72
+ }
73
+ }
74
+ @else if type-of($gutter) == 'number' and strip-unit($gutter) > 0 {
75
+ $padding: rem-calc($gutter) / 2;
76
+ padding-left: $padding;
77
+ padding-right: $padding;
78
+ }
79
+
80
+ // Last column alignment
81
+ @if $grid-column-align-edge {
82
+ &:last-child:not(:first-child) {
83
+ float: $global-right;
84
+ }
85
+ }
86
+ }
87
+
88
+ /// Creates a grid column row. This is the equivalent of adding `.row` and `.column` to the same element.
89
+ ///
90
+ /// @param {Number} $gutter [$grid-column-gutter] - Width of the gutters on either side of the column row.
91
+ @mixin grid-column-row(
92
+ $gutter: $grid-column-gutter
93
+ ) {
94
+ @include grid-row;
95
+ @include grid-column($gutter: $gutter);
96
+
97
+ &,
98
+ &:last-child {
99
+ float: none;
100
+ }
101
+ }
102
+
103
+ /// Shorthand for `grid-column()`.
104
+ /// @alias grid-column
105
+ @function grid-col(
106
+ $columns: $grid-column-count
107
+ ) {
108
+ @return grid-column($columns);
109
+ }
110
+
111
+ /// Shorthand for `grid-column()`.
112
+ /// @alias grid-column
113
+ @mixin grid-col(
114
+ $columns: $grid-column-count,
115
+ $gutter: $grid-column-gutter
116
+ ) {
117
+ @include grid-column($columns, $gutter);
118
+ }
119
+
120
+ /// Shorthand for `grid-column-row()`.
121
+ /// @alias grid-column-row
122
+ @mixin grid-col-row(
123
+ $gutter: $grid-column-gutter
124
+ ) {
125
+ @include grid-column-row($gutter);
126
+ }