foundation_apps_styles 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,207 @@
1
+ /*
2
+ NOTIFICATION
3
+ ------------
4
+
5
+ An alert that pins to the corner of the screen when triggered by JavaScript. It can be set to disappear after a certain period of time, or to stay put until the user clicks on it. A custom action can be asigned to a notification as well.
6
+
7
+ Optionally, the notifications directive can also tap into the browser's native notification support, if it exists.
8
+ */
9
+
10
+ /// @Foundation.settings
11
+ // Notification
12
+ $notification-default-position: right top !default;
13
+ $notification-width: rem-calc(400) !default;
14
+ $notification-offset: $global-padding !default;
15
+
16
+ $notification-background: $primary-color !default;
17
+ $notification-color: white !default;
18
+ $notification-padding: $global-padding !default;
19
+ $notification-radius: 4px !default;
20
+
21
+ $notification-icon-size: 60px !default;
22
+ $notification-icon-margin: $global-padding !default;
23
+ $notification-icon-align: top !default;
24
+
25
+ ///
26
+
27
+ %notification {
28
+ z-index: 1000;
29
+ display: flex;
30
+ position: relative;
31
+ margin-top: .5rem;
32
+ margin-bottom: .5rem;
33
+ display: none;
34
+
35
+ h1 {
36
+ font-size: 1.25em;
37
+ margin: 0;
38
+ }
39
+ p {
40
+ margin: 0;
41
+ }
42
+
43
+ // Placeholder animation
44
+ // transition: opacity 1s ease-out;
45
+
46
+ &.is-active {
47
+ display: flex;
48
+ }
49
+
50
+ .close-button {
51
+ color: white;
52
+ }
53
+ }
54
+
55
+ %notification-container {
56
+ z-index: 3000;
57
+ position: fixed;
58
+
59
+ display: flex;
60
+ flex-direction: column;
61
+ }
62
+
63
+ @mixin notification-layout(
64
+ $x: nth($notification-default-position, 1),
65
+ $y: nth($notification-default-position, 2),
66
+ $size: $notification-width,
67
+ $offset: $notification-offset
68
+ ) {
69
+ width: $size;
70
+
71
+ @if $x == right {
72
+ right: $offset;
73
+ }
74
+ @else if $x == left {
75
+ left: $offset;
76
+ }
77
+ @else if $x == middle {
78
+ left: 50%;
79
+ margin-left: -($size / 2);
80
+ }
81
+
82
+ @if $y == top {
83
+ top: $offset;
84
+ }
85
+ @else if $y == bottom {
86
+ top: auto;
87
+ bottom: $offset;
88
+ }
89
+
90
+ // On small screens, notifications are full width but maintain their vertical orientation
91
+ @include breakpoint(small only) {
92
+ width: auto;
93
+ left: $offset;
94
+ right: $offset;
95
+ margin-left: 0;
96
+ }
97
+ }
98
+ @mixin notification-style(
99
+ $background: $notification-background,
100
+ $color: $notification-color,
101
+ $padding: $notification-padding,
102
+ $radius: $notification-radius
103
+ ) {
104
+ background: $background;
105
+ padding: $padding;
106
+ border-radius: $radius;
107
+
108
+ &, h1, h2, h3, h4, h5, h6 {
109
+ color: $color;
110
+ }
111
+ }
112
+
113
+ @mixin notification(
114
+ $background: $notification-background,
115
+ $color: $notification-color,
116
+ $padding: $notification-padding,
117
+ $radius: $notification-radius
118
+ ) {
119
+ @extend %notification;
120
+ @include notification-style($background, $color, $padding, $radius);
121
+ }
122
+
123
+ @mixin notification-container(
124
+ $x: nth($notification-default-position, 1),
125
+ $y: nth($notification-default-position, 2),
126
+ $size: $notification-width,
127
+ $offset: $notification-offset
128
+ ) {
129
+ @extend %notification-container;
130
+ @include notification-layout($x, $y, $size, $offset);
131
+ }
132
+
133
+ @mixin notification-icon(
134
+ $size: $notification-icon-size,
135
+ $margin: $notification-icon-margin,
136
+ $align: $notification-icon-align
137
+ ) {
138
+ $alignments: (
139
+ top: flex-start,
140
+ middle: middle,
141
+ bottom: flex-end,
142
+ );
143
+ flex: 0 0 $size;
144
+ margin-right: $global-padding;
145
+ align-self: map-get($alignments, $align);
146
+
147
+ img {
148
+ width: 100%;
149
+ height: auto;
150
+ }
151
+ }
152
+
153
+ /*
154
+ CSS Output
155
+ */
156
+
157
+ @include exports(notification) {
158
+ .notification {
159
+ @include notification;
160
+
161
+ &.success { @include notification-style($success-color) }
162
+ &.warning { @include notification-style($warning-color) }
163
+ &.alert { @include notification-style($alert-color) }
164
+ &.dark { @include notification-style($dark-color, #fff) }
165
+
166
+
167
+ }
168
+
169
+ .static-notification {
170
+ @include notification;
171
+
172
+ position: fixed !important;
173
+
174
+ &.top-right { @include notification-layout(right, top); }
175
+ &.top-left { @include notification-layout(left, top); }
176
+ &.top-middle { @include notification-layout(middle, top); }
177
+
178
+ &.bottom-right { @include notification-layout(right, bottom); }
179
+ &.bottom-left { @include notification-layout(left, bottom); }
180
+ &.bottom-middle { @include notification-layout(middle, bottom); }
181
+
182
+ &.success { @include notification-style($success-color) }
183
+ &.warning { @include notification-style($warning-color) }
184
+ &.alert { @include notification-style($alert-color) }
185
+ &.dark { @include notification-style($dark-color, #fff) }
186
+ }
187
+
188
+ .notification-container {
189
+ @include notification-container;
190
+
191
+ &.top-right { @include notification-layout(right, top); }
192
+ &.top-left { @include notification-layout(left, top); }
193
+ &.top-middle { @include notification-layout(middle, top); }
194
+
195
+ &.bottom-right { @include notification-layout(right, bottom); }
196
+ &.bottom-left { @include notification-layout(left, bottom); }
197
+ &.bottom-middle { @include notification-layout(middle, bottom); }
198
+ }
199
+
200
+ .notification-icon {
201
+ @include notification-icon;
202
+ }
203
+ .notification-content {
204
+ flex: 1;
205
+ }
206
+
207
+ }
@@ -0,0 +1,169 @@
1
+ /*
2
+ Off-canvas menu
3
+ ---------------
4
+
5
+ A generic container that stays fixed to the left, top, right, or bottom of the screen, and is summoned when needed. When an off-canvas panel is open, the app frame shifts over to reveal the menu.
6
+ */
7
+
8
+ /// @Foundation.settings
9
+ // Off-canvas
10
+ $offcanvas-size-horizontal: 250px !default;
11
+ $offcanvas-size-vertical: 250px !default;
12
+
13
+ $offcanvas-background: #fff !default;
14
+ $offcanvas-color: isitlight($offcanvas-background) !default;
15
+ $offcanvas-padding: 0 !default;
16
+ $offcanvas-shadow: 3px 0 10px rgba(black, 0.25) !default;
17
+ $offcanvas-animation-speed: 0.25s !default;
18
+
19
+ $offcanvas-frame-selector: '.grid-frame' !default;
20
+ ///
21
+
22
+ %off-canvas {
23
+ position: fixed;
24
+ overflow: auto;
25
+ -webkit-overflow-scrolling: touch;
26
+ transition: transform $offcanvas-animation-speed ease-out;
27
+ z-index: 2;
28
+
29
+ // Active state
30
+ &.is-active {
31
+ transform: translate(0,0) !important;
32
+ }
33
+
34
+ // Frame styles
35
+ & ~ #{$offcanvas-frame-selector} {
36
+ transform: translate(0,0,0);
37
+ transition: transform 0.25s ease-out;
38
+ backface-visibility: hidden;
39
+ background: white;
40
+ }
41
+ }
42
+ @mixin off-canvas-detached {
43
+ z-index: 0;
44
+ box-shadow: none;
45
+
46
+ &, &.is-active {
47
+ transform: none;
48
+ }
49
+
50
+ & ~ #{$offcanvas-frame-selector} {
51
+ z-index: 1;
52
+ box-shadow: 0 0 15px rgba(0,0,0,0.5);
53
+ }
54
+ }
55
+
56
+ @mixin off-canvas-layout(
57
+ $position: left,
58
+ $size: default,
59
+ $shadow: $offcanvas-shadow
60
+ ) {
61
+ /*
62
+ Get shadow values for later use
63
+ */
64
+ $shadow-length: '';
65
+ $shadow-size: '';
66
+ $shadow-color: '';
67
+ @if hasvalue($shadow) {
68
+ $shadow-length: get-shadow-value($shadow, x);
69
+ $shadow-size: get-shadow-value($shadow, size);
70
+ $shadow-color: get-shadow-value($shadow, color);
71
+ }
72
+
73
+ /*
74
+ Sizing
75
+ */
76
+ @if $position == left or $position == right {
77
+ @if $size == default {
78
+ $size: $offcanvas-size-horizontal;
79
+ }
80
+ width: $size;
81
+ height: 100%;
82
+ }
83
+ @else {
84
+ @if $size == default {
85
+ $size: $offcanvas-size-vertical;
86
+ }
87
+ height: $size;
88
+ width: 100%;
89
+ }
90
+
91
+ /*
92
+ Positioning
93
+ */
94
+ @if $position == left {
95
+ top: 0;
96
+ left: 0;
97
+ @if hasvalue($shadow) { box-shadow: inset (-$shadow-length) 0 $shadow-size $shadow-color; }
98
+ transform: translateX(-100%);
99
+ &.is-active {
100
+ & ~ #{$offcanvas-frame-selector} { transform: translateX($size) !important; }
101
+ }
102
+ }
103
+ @else if $position == right {
104
+ left: auto;
105
+ top: 0;
106
+ right: 0;
107
+ @if hasvalue($shadow) { box-shadow: inset $shadow-length 0 $shadow-size $shadow-color; }
108
+ transform: translateX(100%);
109
+ &.is-active {
110
+ & ~ #{$offcanvas-frame-selector} { transform: translateX(-$size) !important; }
111
+ }
112
+ }
113
+ @else if $position == top {
114
+ top: 0;
115
+ left: 0;
116
+ transform: translateY(-100%);
117
+ @if hasvalue($shadow) { box-shadow: inset 0 (-$shadow-length) $shadow-size $shadow-color; }
118
+ &.is-active {
119
+ & ~ #{$offcanvas-frame-selector} { transform: translateY($size) !important; }
120
+ }
121
+ }
122
+ @else if $position == bottom {
123
+ top: auto;
124
+ bottom: 0;
125
+ left: 0;
126
+ transform: translateY(100%);
127
+ @if hasvalue($shadow) { box-shadow: inset 0 $shadow-length $shadow-size $shadow-color; }
128
+ &.is-active {
129
+ & ~ #{$offcanvas-frame-selector} { transform: translateY(-$size) !important; }
130
+ }
131
+ }
132
+ }
133
+
134
+ @mixin off-canvas-style(
135
+ $background: $offcanvas-background,
136
+ $color: $offcanvas-color,
137
+ $padding: $offcanvas-padding
138
+ ) {
139
+ background: $background;
140
+
141
+ @if $color == auto {
142
+ color: isitlight($background, #000, #fff);
143
+ }
144
+ @else {
145
+ color: $color;
146
+ }
147
+
148
+ @if hasvalue($padding) {
149
+ padding: $padding;
150
+ }
151
+ }
152
+
153
+ @include exports(off-canvas) {
154
+ .off-canvas {
155
+ @extend %off-canvas;
156
+ @include off-canvas-layout;
157
+ @include off-canvas-style;
158
+
159
+ &.top { @include off-canvas-layout(top); }
160
+ &.right { @include off-canvas-layout(right); }
161
+ &.bottom { @include off-canvas-layout(bottom); }
162
+ &.left { @include off-canvas-layout(left); }
163
+
164
+ &.detached { @include off-canvas-detached; }
165
+
166
+ &.primary { @include off-canvas-style($primary-color, auto); }
167
+ &.dark { @include off-canvas-style($dark-color, auto); }
168
+ }
169
+ }
@@ -0,0 +1,134 @@
1
+ /*
2
+ PANEL
3
+ -----
4
+
5
+ The friendly panel is an all-purpose container for hiding content off-screen.
6
+
7
+ Features:
8
+ - Position at top, right, bottom, or left
9
+ - Anchor to grid block or window
10
+ - Define max width or height
11
+ - Transform into grid block depending on screen size
12
+ */
13
+
14
+ /// @Foundation.settings
15
+ // Panel
16
+ $panel-size-horizontal: 300px !default;
17
+ $panel-size-vertical: 300px !default;
18
+ $panel-padding: 0 !default;
19
+
20
+ $panel-background: #fff !default;
21
+ $panel-shadow: 3px 0 10px rgba(black, 0.25) !default;
22
+
23
+ // DEPRECATED: these variables will be removed in a future version.
24
+ $panel-animation-speed: 0.25s !default;
25
+ ///
26
+
27
+ %panel-base {
28
+ display: block;
29
+ position: absolute;
30
+ z-index: 100;
31
+ overflow-y: auto;
32
+ display: none;
33
+
34
+ &.is-active {
35
+ display: block;
36
+ }
37
+ }
38
+
39
+ @mixin panel-layout(
40
+ $position: left,
41
+ $size: default,
42
+ $shadow: $panel-shadow
43
+ ) {
44
+ @if $size == default {
45
+ @if $position == left or $position == right {
46
+ $size: $panel-size-horizontal;
47
+ }
48
+ @if $position == top or $position == bottom {
49
+ $size: $panel-size-vertical;
50
+ }
51
+ }
52
+
53
+ /*
54
+ Direction
55
+ */
56
+ @if $position == top {
57
+ top: 0;
58
+ left: 0;
59
+ width: 100%;
60
+ }
61
+ @else if $position == right {
62
+ top: 0;
63
+ right: 0;
64
+ height: 100%;
65
+ }
66
+ @else if $position == bottom {
67
+ bottom: 0;
68
+ left: 0;
69
+ width: 100%;
70
+ }
71
+ @else if $position == left {
72
+ top: 0;
73
+ left: 0;
74
+ height: 100%;
75
+ }
76
+
77
+ /*
78
+ Sizing
79
+ */
80
+ // Horizontal panels are always all the way tall and have a set width
81
+ @if $position == left or $position == right {
82
+ @if unit($size) == '%' {
83
+ width: $size;
84
+ }
85
+ @else {
86
+ width: 100%;
87
+ @include breakpoint($size) {
88
+ width: $size;
89
+ }
90
+ }
91
+ }
92
+ // (For now) vertical panels don't change size
93
+ @if $position == top or $position == bottom {
94
+ height: $size;
95
+ }
96
+
97
+ /*
98
+ Shadows
99
+ */
100
+ $shadow-distance: get-shadow-value($shadow, x);
101
+ $shadow-size: get-shadow-value($shadow, size);
102
+ $shadow-color: get-shadow-value($shadow, color);
103
+ &.is-active {
104
+ @if $position == left { box-shadow: $shadow-distance 0 $shadow-size $shadow-color; }
105
+ @else if $position == right { box-shadow: (-$shadow-distance) 0 $shadow-size $shadow-color; }
106
+ @else if $position == top { box-shadow: 0 $shadow-distance $shadow-size $shadow-color; }
107
+ @else if $position == bottom { box-shadow: 2px (-$shadow-distance) $shadow-size $shadow-color; }
108
+ }
109
+ }
110
+
111
+ @mixin panel-style(
112
+ $padding: $panel-padding,
113
+ $background: $panel-background
114
+ ) {
115
+ /*
116
+ Basic styles
117
+ */
118
+ padding: $padding;
119
+ background: $background;
120
+ }
121
+
122
+ @include exports(panel) {
123
+ .panel {
124
+ @extend %panel-base;
125
+ @include panel-style;
126
+ }
127
+
128
+ .panel-top { @include panel-layout(top); }
129
+ .panel-right { @include panel-layout(right); }
130
+ .panel-bottom { @include panel-layout(bottom); }
131
+ .panel-left { @include panel-layout(left); }
132
+
133
+ .panel-fixed { position: fixed; }
134
+ }