foundation_apps_styles 1.1.0

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 (70) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +41 -0
  6. data/Rakefile +13 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +7 -0
  9. data/foundation_apps_styles.gemspec +24 -0
  10. data/lib/foundation_apps_styles.rb +6 -0
  11. data/lib/foundation_apps_styles/version.rb +3 -0
  12. data/vendor/assets/iconic/account.svg +44 -0
  13. data/vendor/assets/iconic/action.svg +38 -0
  14. data/vendor/assets/iconic/ban.svg +17 -0
  15. data/vendor/assets/iconic/bell.svg +22 -0
  16. data/vendor/assets/iconic/bookmark.svg +14 -0
  17. data/vendor/assets/iconic/cart.svg +35 -0
  18. data/vendor/assets/iconic/chevron.svg +28 -0
  19. data/vendor/assets/iconic/circle-check.svg +25 -0
  20. data/vendor/assets/iconic/circle-x.svg +25 -0
  21. data/vendor/assets/iconic/cog.svg +17 -0
  22. data/vendor/assets/iconic/comment-square.svg +14 -0
  23. data/vendor/assets/iconic/dashboard.svg +38 -0
  24. data/vendor/assets/iconic/document.svg +28 -0
  25. data/vendor/assets/iconic/envelope.svg +44 -0
  26. data/vendor/assets/iconic/flag.svg +24 -0
  27. data/vendor/assets/iconic/home.svg +28 -0
  28. data/vendor/assets/iconic/lock.svg +55 -0
  29. data/vendor/assets/iconic/magnifying-glass.svg +26 -0
  30. data/vendor/assets/iconic/person.svg +62 -0
  31. data/vendor/assets/iconic/reload.svg +19 -0
  32. data/vendor/assets/iconic/share-boxed.svg +17 -0
  33. data/vendor/assets/iconic/star.svg +14 -0
  34. data/vendor/assets/iconic/thumb.svg +38 -0
  35. data/vendor/assets/iconic/zoom.svg +56 -0
  36. data/vendor/assets/stylesheets/_global.scss +131 -0
  37. data/vendor/assets/stylesheets/_includes.scss +33 -0
  38. data/vendor/assets/stylesheets/_settings.scss +614 -0
  39. data/vendor/assets/stylesheets/components/_accordion.scss +72 -0
  40. data/vendor/assets/stylesheets/components/_action-sheet.scss +265 -0
  41. data/vendor/assets/stylesheets/components/_block-list.scss +360 -0
  42. data/vendor/assets/stylesheets/components/_button-group.scss +197 -0
  43. data/vendor/assets/stylesheets/components/_button.scss +205 -0
  44. data/vendor/assets/stylesheets/components/_card.scss +93 -0
  45. data/vendor/assets/stylesheets/components/_extras.scss +54 -0
  46. data/vendor/assets/stylesheets/components/_forms.scss +460 -0
  47. data/vendor/assets/stylesheets/components/_grid.scss +422 -0
  48. data/vendor/assets/stylesheets/components/_iconic.scss +95 -0
  49. data/vendor/assets/stylesheets/components/_label.scss +134 -0
  50. data/vendor/assets/stylesheets/components/_list.scss +19 -0
  51. data/vendor/assets/stylesheets/components/_menu-bar.scss +382 -0
  52. data/vendor/assets/stylesheets/components/_modal.scss +129 -0
  53. data/vendor/assets/stylesheets/components/_motion.scss +525 -0
  54. data/vendor/assets/stylesheets/components/_notification.scss +207 -0
  55. data/vendor/assets/stylesheets/components/_off-canvas.scss +169 -0
  56. data/vendor/assets/stylesheets/components/_panel.scss +134 -0
  57. data/vendor/assets/stylesheets/components/_popup.scss +68 -0
  58. data/vendor/assets/stylesheets/components/_switch.scss +134 -0
  59. data/vendor/assets/stylesheets/components/_tabs.scss +100 -0
  60. data/vendor/assets/stylesheets/components/_title-bar.scss +135 -0
  61. data/vendor/assets/stylesheets/components/_typography.scss +345 -0
  62. data/vendor/assets/stylesheets/components/_utilities.scss +160 -0
  63. data/vendor/assets/stylesheets/foundation-apps.css +6146 -0
  64. data/vendor/assets/stylesheets/foundation.scss +50 -0
  65. data/vendor/assets/stylesheets/helpers/_breakpoints.scss +154 -0
  66. data/vendor/assets/stylesheets/helpers/_functions.scss +343 -0
  67. data/vendor/assets/stylesheets/helpers/_images.scss +19 -0
  68. data/vendor/assets/stylesheets/helpers/_mixins.scss +123 -0
  69. data/vendor/assets/stylesheets/vendor/_normalize.scss +424 -0
  70. metadata +140 -0
@@ -0,0 +1,197 @@
1
+ /// @Foundation.settings
2
+ // Button Group
3
+ $btngroup-background: $primary-color !default;
4
+ $btngroup-color: #fff !default;
5
+ $btngroup-radius: $button-radius !default;
6
+ ///
7
+
8
+ $child-selectors: '> a, > label, > button';
9
+
10
+ %button-group {
11
+ margin: 0;
12
+ margin-bottom: 1rem;
13
+ list-style-type: none;
14
+ display: inline-flex;
15
+ border-radius: $btngroup-radius;
16
+ overflow: hidden;
17
+ font-size: $button-font-size;
18
+
19
+ > li {
20
+ flex: 0 0 auto;
21
+
22
+ // Links become buttons
23
+ #{$child-selectors} {
24
+ @extend %button;
25
+ border-radius: 0;
26
+ font-size: inherit;
27
+ display: block;
28
+ margin: 0;
29
+ }
30
+ > input + label {
31
+ margin-left: 0;
32
+ }
33
+ // Add borders between items
34
+ &:not(:last-child) {
35
+ #{$child-selectors} {
36
+ border-right: 1px solid scale-color($btngroup-background, $lightness: -25%);
37
+ }
38
+ }
39
+ }
40
+
41
+ @if using(iconic) {
42
+ .iconic {
43
+ width: 1em;
44
+ height: 1em;
45
+ vertical-align: middle;
46
+ margin-right: 0.25em;
47
+ margin-top: -2px; // The icons are oddly misaligned
48
+ }
49
+ }
50
+ }
51
+
52
+ %button-group-segmented {
53
+ border: 1px solid $primary-color;
54
+ transition-property: background color;
55
+
56
+ > li {
57
+ // Hide the radio button
58
+ > input[type="radio"] {
59
+ position: absolute;
60
+ left: -9999px;
61
+ }
62
+ // This is the button
63
+ #{$child-selectors} {
64
+ margin-right: 0;
65
+ background: transparent;
66
+ }
67
+ }
68
+ }
69
+
70
+ @mixin button-group-size($size: medium, $expand: false) {
71
+ $size: $button-font-size * map-get($button-sizes, $size);
72
+ font-size: $size;
73
+
74
+ @if $expand {
75
+ @include button-group-expand;
76
+ }
77
+ }
78
+ @mixin button-group-expand($stretch: true) {
79
+ display: if($stretch, flex, inline-flex);
80
+
81
+ > li {
82
+ flex: if($stretch, 1, 0 0 auto);
83
+
84
+ #{$child-selectors} {
85
+ @if $stretch { @include button-expand; }
86
+ }
87
+ }
88
+ }
89
+ @mixin button-group-style(
90
+ $segmented: false,
91
+ $background: $primary-color,
92
+ $color: auto
93
+ ) {
94
+
95
+ @if not($segmented) {
96
+ > li {
97
+ #{$child-selectors} {
98
+ @include button-style($background, auto, $color);
99
+ border-color: scale-color($background, $lightness: -15%);
100
+ }
101
+ &.is-active {
102
+ #{$child-selectors} {
103
+ background: scale-color($background, $lightness: -15%);
104
+ }
105
+ }
106
+ }
107
+ }
108
+ @else {
109
+ @extend %button-group-segmented;
110
+ $hover-color: rgba($background, 0.25);
111
+ border-color: $background;
112
+
113
+ > li {
114
+ // This is the button
115
+ #{$child-selectors} {
116
+ border-color: $background;
117
+ color: $background;
118
+
119
+ // This is the button being hovered on
120
+ &:hover {
121
+ background: $hover-color;
122
+ color: $background;
123
+ }
124
+
125
+ @if using(iconic) {
126
+ .iconic { @include color-icon($background); }
127
+ }
128
+ }
129
+
130
+ // This is the button when it's active
131
+ &.is-active > a,
132
+ > input:checked + label {
133
+ &, &:hover {
134
+ background: $background;
135
+ color: isitlight($background);
136
+ }
137
+
138
+ @if using(iconic) {
139
+ .iconic { @include color-icon(isitlight($background)); }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ @mixin button-group(
147
+ $segmented: false,
148
+ $expand: false,
149
+ $background: $primary-color,
150
+ $color: #fff
151
+ ) {
152
+ @extend %button-group;
153
+ @include button-group-expand($expand);
154
+ @include button-group-style($segmented, $background, $color);
155
+ border-radius: $btngroup-radius;
156
+ }
157
+
158
+ @include exports(button-group) {
159
+ .button-group {
160
+ @include button-group;
161
+
162
+ // Colors
163
+ &.secondary { @include button-group-style(false, $secondary-color); }
164
+ &.success { @include button-group-style(false, $success-color); }
165
+ &.warning { @include button-group-style(false, $warning-color); }
166
+ &.alert { @include button-group-style(false, $alert-color); }
167
+
168
+ // Individual colors
169
+ > li {
170
+ &.secondary { #{$child-selectors} { @include button-style($secondary-color, auto, $btngroup: true); } }
171
+ &.success { #{$child-selectors} { @include button-style($success-color, auto, $btngroup: true); } }
172
+ &.warning { #{$child-selectors} { @include button-style($warning-color, auto, $btngroup: true); } }
173
+ &.alert { #{$child-selectors} { @include button-style($alert-color, auto, $btngroup: true); } }
174
+ }
175
+
176
+ // Segmented
177
+ &.segmented { @include button-group-style(true);
178
+ &.secondary { @include button-group-style(true, $secondary-color); }
179
+ &.success { @include button-group-style(true, $success-color); }
180
+ &.warning { @include button-group-style(true, $warning-color); }
181
+ &.alert { @include button-group-style(true, $alert-color); }
182
+ }
183
+
184
+ // Sizing
185
+ &.tiny { @include button-group-size(tiny); }
186
+ &.small { @include button-group-size(small); }
187
+ &.large { @include button-group-size(large); }
188
+ &.expand { @include button-group-expand; }
189
+
190
+ // Disabled
191
+ li.disabled {
192
+ #{$child-selectors} {
193
+ @include button-disabled;
194
+ }
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,205 @@
1
+ /// @Foundation.settings
2
+ // Button
3
+ $button-padding: 0.85em 1em !default;
4
+ $button-margin: 0 $global-padding $global-padding 0 !default;
5
+ $button-style: solid !default;
6
+ $button-background: $primary-color !default;
7
+ $button-background-hover: scale-color($button-background, $lightness: -15%) !default;
8
+ $button-color: auto !default;
9
+ $button-radius: 0 !default;
10
+ $button-sizes: (
11
+ tiny: 0.7,
12
+ small: 0.8,
13
+ medium: 1,
14
+ large: 1.3,
15
+ ) !default;
16
+ $button-font-size: 0.9rem !default;
17
+ $button-opacity-disabled: 0.5 !default;
18
+ $button-tag-selector: false !default;
19
+ ///
20
+
21
+ %button {
22
+ display: inline-block;
23
+ border: 0;
24
+ text-align: center;
25
+ line-height: 1;
26
+ cursor: pointer;
27
+ -webkit-appearance: none;
28
+ -webkit-font-smoothing: antialiased;
29
+ transition: background 0.25s ease-out;
30
+ vertical-align: middle;
31
+
32
+ padding: $button-padding;
33
+ margin: $button-margin;
34
+ font-size: $button-font-size;
35
+ border-radius: $button-radius;
36
+
37
+ // Dropdown arrow
38
+ // TODO: Change to class and mixin because now the toggle is 'fa-open' which is too generic
39
+ // &[data-popup-toggle] {
40
+ // position: relative;
41
+ // padding-right: 2em; // Placeholder
42
+
43
+ // &::after {
44
+ // @include css-triangle(6px, black, top);
45
+ // position: absolute;
46
+ // right: 0.7em;
47
+ // top: 50%;
48
+ // margin-top: -3px;
49
+ // }
50
+ // }
51
+ }
52
+
53
+ @mixin button-size($size: medium, $expand: false) {
54
+ $size: $button-font-size * map-get($button-sizes, $size);
55
+ font-size: $size;
56
+
57
+ @if $expand {
58
+ @include button-expand;
59
+ }
60
+
61
+ @if using(iconic) {
62
+ .iconic {
63
+ width: 1em;
64
+ height: 1em;
65
+ vertical-align: middle;
66
+ margin-right: 0.25em;
67
+ margin-top: -2px; // The icons are oddly misaligned
68
+ }
69
+ }
70
+ }
71
+
72
+ @mixin button-expand($expand: true) {
73
+ @if $expand {
74
+ display: block;
75
+ width: 100%;
76
+ margin-left: 0;
77
+ margin-right: 0;
78
+ }
79
+ @else {
80
+ display: inline-block;
81
+ width: auto;
82
+ margin: $button-margin;
83
+ }
84
+ }
85
+
86
+ @mixin button-style(
87
+ $background: $button-background,
88
+ $background-hover: $button-background-hover,
89
+ $color: $button-color,
90
+ $style: $button-style,
91
+ $radius: $button-radius,
92
+ $btngroup: false
93
+ ){
94
+ @if $style == hollow {
95
+ border: 1px solid $background;
96
+ background: transparent;
97
+ color: $background;
98
+
99
+ &:hover, &:focus {
100
+ border-color: scale-color($background, $lightness: 25%);
101
+ background: transparent;
102
+ color: scale-color($background, $lightness: 25%);
103
+ }
104
+ }
105
+ // Solid is the default
106
+ @else {
107
+ @if $color == auto {
108
+ $color: isitlight($background);
109
+ }
110
+
111
+ background: $background;
112
+ color: $color;
113
+
114
+ &:hover, &:focus {
115
+ @if $background-hover == auto {
116
+ background: scale-color($background, $lightness: -15%);
117
+ }
118
+ @else {
119
+ background: $background-hover;
120
+ }
121
+ color: $color;
122
+ }
123
+ }
124
+
125
+ @if $btngroup {
126
+ border-color: $background;
127
+ &:hover, &:focus {
128
+ border-color: scale-color($background, $lightness: -25%);
129
+ }
130
+ }
131
+
132
+ @if using(iconic) {
133
+ @if $style == hollow {
134
+ .iconic {
135
+ @include color-icon($background);
136
+ }
137
+ &:hover .iconic {
138
+ @include color-icon(scale-color($background, $lightness: 25%));
139
+ }
140
+ }
141
+ @else {
142
+ .iconic {
143
+ @include color-icon($color);
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ @mixin button-disabled() {
150
+ opacity: $button-opacity-disabled;
151
+ cursor: default;
152
+ pointer-events: none;
153
+ }
154
+
155
+ @mixin button(
156
+ $size: medium,
157
+ $expand: false,
158
+ $background: $button-background,
159
+ $background-hover: $button-background-hover,
160
+ $color: $button-color,
161
+ $style: $button-style,
162
+ $radius: $button-radius
163
+ ) {
164
+ @extend %button;
165
+ @include button-size($size);
166
+ @include button-expand($expand);
167
+ @include button-style($background, $background-hover, $color, $style);
168
+ }
169
+
170
+ @include exports(button) {
171
+ .button {
172
+ @include button;
173
+
174
+ &.tiny { @include button-size(tiny); }
175
+ &.small { @include button-size(small); }
176
+ &.large { @include button-size(large); }
177
+ &.expand { @include button-expand; }
178
+
179
+ &.secondary { @include button-style($secondary-color, auto) }
180
+ &.success { @include button-style($success-color, auto) }
181
+ &.warning { @include button-style($warning-color, auto) }
182
+ &.alert { @include button-style($alert-color, auto) }
183
+ &.info { @include button-style($info-color, auto) }
184
+ &.dark { @include button-style($dark-color, auto) }
185
+
186
+ @if $button-style != hollow {
187
+ &.hollow { @include button-style($style: hollow);
188
+ &.secondary { @include button-style($secondary-color, $style: hollow); }
189
+ &.success { @include button-style($success-color, $style: hollow); }
190
+ &.warning { @include button-style($warning-color, $style: hollow); }
191
+ &.alert { @include button-style($alert-color, $style: hollow); }
192
+ &.info { @include button-style($info-color, $style: hollow); }
193
+ &.dark { @include button-style($dark-color, $style: hollow); }
194
+ }
195
+ }
196
+
197
+ &.disabled { @include button-disabled; }
198
+ }
199
+
200
+ @if $button-tag-selector {
201
+ button {
202
+ @extend .button;
203
+ }
204
+ }
205
+ }
@@ -0,0 +1,93 @@
1
+ /*
2
+ Cards
3
+
4
+ Structure:
5
+
6
+ titles
7
+ lists
8
+ */
9
+
10
+ /// @Foundation.settings
11
+ // Card
12
+ $card-background: #fff !default;
13
+ $card-color: isitlight($card-background) !default;
14
+ $card-border: 1px solid smartscale($card-background, 7%) !default;
15
+ $card-radius: $global-radius !default;
16
+ $card-shadow: 0 1px 2px rgba(#000, 0.2) !default;
17
+ $card-padding: $global-padding !default;
18
+ $card-margin: 0.5rem !default;
19
+
20
+ $card-divider-background: smartscale($card-background, 7%) !default;
21
+ ///
22
+
23
+ @mixin card-container(
24
+ $background: $card-background,
25
+ $color: $card-color,
26
+ $border: $card-border,
27
+ $radius: $card-radius,
28
+ $shadow: $card-shadow,
29
+ $padding: $card-padding,
30
+ $margin: $card-margin
31
+ ) {
32
+ border: $border;
33
+ margin-bottom: $margin;
34
+ background: $background;
35
+ color: $color;
36
+ border-radius: $radius;
37
+ box-shadow: $shadow;
38
+ overflow: hidden;
39
+
40
+ h1, h2, h3, h4, h5, h6 {
41
+ color: inherit;
42
+ }
43
+
44
+ ul {
45
+ margin-bottom: 0;
46
+ }
47
+
48
+ img {
49
+ width: 100%;
50
+ }
51
+ }
52
+
53
+ @mixin card-divider(
54
+ $background: $card-divider-background,
55
+ $padding: $card-padding
56
+ ) {
57
+ background: $background;
58
+ padding: $padding;
59
+ }
60
+
61
+ @mixin card-section(
62
+ $padding: $card-padding
63
+ ) {
64
+ padding: $padding;
65
+ }
66
+
67
+ @include exports(card) {
68
+ .card {
69
+ @include card-container;
70
+
71
+ @each $color in map-keys($foundation-colors) {
72
+ &.#{$color} {
73
+ $color-value: map-get($foundation-colors, $color);
74
+ @include card-container(
75
+ $background: $color-value,
76
+ $color: isitlight($color-value),
77
+ $border: 0
78
+ );
79
+ .card-divider {
80
+ @include card-divider(
81
+ $background: smartscale($color-value, 7%)
82
+ );
83
+ }
84
+ }
85
+ }
86
+ }
87
+ .card-divider {
88
+ @include card-divider;
89
+ }
90
+ .card-section {
91
+ @include card-section;
92
+ }
93
+ }