edge_framework 1.4.1 → 2.0.0.a
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 +8 -8
- data/LICENSE.txt +1 -1
- data/README.md +180 -305
- data/assets/kitchensink.html +422 -513
- data/assets/sass/_edge.scss +1 -1
- data/assets/sass/edge/_base.scss +47 -70
- data/assets/sass/edge/_components.scss +0 -1
- data/assets/sass/edge/components/_button.scss +8 -78
- data/assets/sass/edge/components/_form.scss +22 -91
- data/assets/sass/edge/components/_grid.scss +99 -123
- data/assets/sass/edge/components/_normalize.scss +9 -4
- data/assets/sass/edge/components/_print.scss +1 -1
- data/assets/sass/edge/components/_tile.scss +38 -52
- data/assets/sass/edge/components/_typography.scss +0 -1
- data/assets/test/kitchensink.scss +68 -216
- data/edge.gemspec +5 -4
- data/lib/edge/version.rb +3 -3
- data/template/base/assets/js/vendor/edge.js +20 -0
- data/template/base/assets/js/vendor/webcomponents.min.js +14 -0
- data/template/base/assets/sass/_setting.scss +1 -4
- data/template/base/assets/sass/framework.scss +14 -1
- data/template/base/config.rb +1 -2
- data/template/html/index.html +2 -0
- data/template/wordpress/views/layout.twig +9 -9
- metadata +11 -10
- data/assets/sass/edge/components/_visibility.scss +0 -95
data/assets/sass/_edge.scss
CHANGED
data/assets/sass/edge/_base.scss
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
@charset "UTF-8";
|
2
2
|
@import "compass";
|
3
3
|
|
4
|
-
// ------------------------------------
|
5
|
-
// Override default Compass' variables
|
6
|
-
// ------------------------------------
|
7
|
-
$contrasted-dark-default : #222;
|
8
|
-
$contrasted-light-default : white;
|
9
|
-
|
10
4
|
// Remove useless vendor prefix
|
11
5
|
$support-for-original-webkit-gradients : false;
|
12
6
|
$experimental-support-for-microsoft : false;
|
@@ -23,18 +17,13 @@ $adaptive : false !default;
|
|
23
17
|
|
24
18
|
// Shouldn't be modified by user
|
25
19
|
$user-mode : false !default; // check whether the mixin call is coming from framework or user
|
26
|
-
$
|
20
|
+
$in-media : false !default; // check whether the content is inside media query
|
27
21
|
|
28
22
|
// Must be true
|
29
23
|
$include-normalize : true !default;
|
30
24
|
$include-typography : true !default;
|
31
25
|
$include-grid : true !default;
|
32
|
-
$include-form : true !default;
|
33
|
-
|
34
|
-
// Default is true
|
35
26
|
$include-tile : true !default;
|
36
|
-
$include-visibility : true !default;
|
37
|
-
$include-button : true !default;
|
38
27
|
|
39
28
|
// Default is false
|
40
29
|
$include-animate : false !default;
|
@@ -108,6 +97,7 @@ $body-line-height : 1.5 !default;
|
|
108
97
|
// -------------------
|
109
98
|
$mini-screen : 480px !default;
|
110
99
|
$small-screen : 767px !default;
|
100
|
+
$medium-screen : 1000px !default;
|
111
101
|
$large-screen : 1440px !default;
|
112
102
|
$retina-screen : 192dpi !default;
|
113
103
|
|
@@ -123,6 +113,9 @@ $retina-screen : 192dpi !default;
|
|
123
113
|
@else if $size == small {
|
124
114
|
@return $small-screen;
|
125
115
|
}
|
116
|
+
@else if $size == medium {
|
117
|
+
@return $medium-screen;
|
118
|
+
}
|
126
119
|
@else if $size == large {
|
127
120
|
@return $large-screen;
|
128
121
|
}
|
@@ -131,78 +124,62 @@ $retina-screen : 192dpi !default;
|
|
131
124
|
}
|
132
125
|
}
|
133
126
|
|
134
|
-
//
|
135
|
-
@function below($named-size) {
|
136
|
-
$size: translateSize($named-size);
|
137
|
-
@if $size == retina {
|
138
|
-
@return "(-webkit-max-device-pixel-ratio: 2), (max-resolution: #{$size})";
|
139
|
-
}
|
140
|
-
@else {
|
141
|
-
@return "(max-width: #{$size})";
|
142
|
-
}
|
143
|
-
}
|
127
|
+
// Standalone mixin
|
144
128
|
|
145
|
-
@
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
129
|
+
@mixin below($named-size) {
|
130
|
+
@if $responsive {
|
131
|
+
$in-media: true !global;
|
132
|
+
$size: translateSize($named-size);
|
133
|
+
|
134
|
+
@if $named-size == retina {
|
135
|
+
@media only screen and (-webkit-max-device-pixel-ratio: 2), (max-resolution: $size) {
|
136
|
+
@content;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
@else {
|
140
|
+
@media only screen and (max-width: $size) { @content; }
|
141
|
+
}
|
142
|
+
|
143
|
+
$in-media: false !global;
|
152
144
|
}
|
153
145
|
}
|
154
146
|
|
155
|
-
@
|
156
|
-
$
|
157
|
-
|
158
|
-
|
159
|
-
|
147
|
+
@mixin above($named-size) {
|
148
|
+
@if $responsive {
|
149
|
+
$in-media: true !global;
|
150
|
+
$size: translateSize($named-size) + 1px;
|
151
|
+
|
152
|
+
@if $named-size == retina {
|
153
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: $size) {
|
154
|
+
@content;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
@else {
|
158
|
+
@media only screen and (min-width: $size) { @content; }
|
159
|
+
}
|
160
160
|
|
161
|
-
|
162
|
-
|
161
|
+
$in-media: false !global;
|
162
|
+
}
|
163
163
|
}
|
164
164
|
|
165
|
-
@
|
166
|
-
@
|
167
|
-
|
165
|
+
@mixin between($smaller-size, $larger-size) {
|
166
|
+
@if $responsive {
|
167
|
+
$in-media: true !global;
|
168
|
+
$smaller-size: translateSize($smaller-size);
|
169
|
+
$larger-size: translateSize($larger-size);
|
168
170
|
|
169
|
-
|
170
|
-
@mixin below($named-size) {
|
171
|
-
$is-in-media: true;
|
172
|
-
$size: translateSize($named-size);
|
173
|
-
@if $named-size == retina {
|
174
|
-
@media only screen and (-webkit-max-device-pixel-ratio: 2), (max-resolution: $size) {
|
171
|
+
@media only screen and (min-width: $smaller-size) and (max-width: $larger-size) {
|
175
172
|
@content;
|
176
173
|
}
|
177
|
-
}
|
178
|
-
@else {
|
179
|
-
@media only screen and (max-width: $size) { @content; }
|
180
|
-
}
|
181
|
-
$is-in-media: false;
|
182
|
-
}
|
183
174
|
|
184
|
-
|
185
|
-
$is-in-media: true;
|
186
|
-
$size: translateSize($named-size) + 1px;
|
187
|
-
@if $named-size == retina {
|
188
|
-
@media only screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: $size) {
|
189
|
-
@content;
|
190
|
-
}
|
191
|
-
}
|
192
|
-
@else {
|
193
|
-
@media only screen and (min-width: $size) { @content; }
|
175
|
+
$in-media: false !global;
|
194
176
|
}
|
195
|
-
$is-in-media: false;
|
196
177
|
}
|
197
178
|
|
198
|
-
@mixin
|
199
|
-
|
200
|
-
$smaller-size: translateSize($smaller-size);
|
201
|
-
$larger-size: translateSize($larger-size);
|
202
|
-
@media only screen and (min-width: $smaller-size) and (max-width: $larger-size) {
|
179
|
+
@mixin print {
|
180
|
+
@media only print {
|
203
181
|
@content;
|
204
182
|
}
|
205
|
-
$is-in-media: false;
|
206
183
|
}
|
207
184
|
|
208
185
|
// ----------------------------------------------
|
@@ -211,11 +188,11 @@ $retina-screen : 192dpi !default;
|
|
211
188
|
// ----------------------------------------------
|
212
189
|
@mixin clearfix {
|
213
190
|
zoom: 1;
|
214
|
-
|
191
|
+
&::before, &::after {
|
215
192
|
content: " ";
|
216
193
|
display: table;
|
217
194
|
}
|
218
|
-
|
195
|
+
&::after {
|
219
196
|
clear: both;
|
220
197
|
}
|
221
198
|
}
|
@@ -2,84 +2,14 @@
|
|
2
2
|
// EDGE BUTTON
|
3
3
|
// =============
|
4
4
|
|
5
|
-
|
5
|
+
// All the elements that need button styling
|
6
|
+
@mixin button {
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
background-color: lighten($color, 5%);
|
8
|
+
button,
|
9
|
+
.button,
|
10
|
+
input[type="submit"],
|
11
|
+
input[type="reset"] {
|
12
|
+
@content;
|
13
13
|
}
|
14
|
-
}
|
15
14
|
|
16
|
-
|
17
|
-
// BUTTON :active
|
18
|
-
// -----------------
|
19
|
-
@mixin button-active($color) {
|
20
|
-
&:active {
|
21
|
-
// Make it darker than hover state if background is light
|
22
|
-
@if is_light($color) {
|
23
|
-
background-color: darken($color, 10%);
|
24
|
-
}
|
25
|
-
// Darken background if background is dark
|
26
|
-
@else {
|
27
|
-
background-color: darken($color, 5%);
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
// ---------------
|
33
|
-
// BUTTON :focus
|
34
|
-
// ---------------
|
35
|
-
@mixin button-focus() {
|
36
|
-
&:focus {
|
37
|
-
outline: none;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
// -----------------
|
42
|
-
// BUTTON
|
43
|
-
// Create button
|
44
|
-
// -----------------
|
45
|
-
@mixin button(
|
46
|
-
$color : $button-color,
|
47
|
-
$for-base : false) {
|
48
|
-
|
49
|
-
@if $for-base {
|
50
|
-
display: inline-block;
|
51
|
-
cursor: pointer;
|
52
|
-
position: relative;
|
53
|
-
|
54
|
-
border: 1px solid transparent;
|
55
|
-
padding: 10px 20px;
|
56
|
-
|
57
|
-
font-weight: 700;
|
58
|
-
}
|
59
|
-
|
60
|
-
background-color: $color;
|
61
|
-
color: white;
|
62
|
-
|
63
|
-
@if $for-base {
|
64
|
-
@include border-radius($g-radius);
|
65
|
-
@include transition($g-transition);
|
66
|
-
@include button-focus();
|
67
|
-
}
|
68
|
-
|
69
|
-
@include button-hover($color);
|
70
|
-
@include button-active($color);
|
71
|
-
}
|
72
|
-
|
73
|
-
@if $include-button and not $user-mode {
|
74
|
-
|
75
|
-
/* ---------------
|
76
|
-
EDGE Button
|
77
|
-
--------------- */
|
78
|
-
button,
|
79
|
-
.button,
|
80
|
-
input[type="submit"],
|
81
|
-
input[type="reset"] {
|
82
|
-
@include button($for-base: true);
|
83
|
-
}
|
84
|
-
|
85
|
-
} // $include-button
|
15
|
+
}
|
@@ -2,109 +2,40 @@
|
|
2
2
|
// EDGE FORM
|
3
3
|
// ============
|
4
4
|
|
5
|
-
$
|
6
|
-
|
7
|
-
$input-border-color : $passive-color !default;
|
8
|
-
|
9
|
-
$input-border : $input-border-style $input-border-color !default;
|
10
|
-
$input-border-hover : $input-border-style darken($input-border-color, 10%) !default;
|
11
|
-
$input-border-focus : $input-border-style $main-color !default;
|
12
|
-
|
13
|
-
$prefix-bg-color : $passive-color !default;
|
14
|
-
|
15
|
-
@mixin input() {
|
5
|
+
@mixin input($style: false) {
|
6
|
+
|
16
7
|
[type="text"],
|
17
8
|
[type="password"],
|
18
9
|
[type="date"],
|
10
|
+
[type="time"],
|
19
11
|
[type="datetime"],
|
20
|
-
[type="datetime-local"],
|
21
|
-
[type="month"],
|
22
|
-
[type="week"],
|
23
12
|
[type="email"],
|
24
13
|
[type="number"],
|
25
14
|
[type="search"],
|
26
15
|
[type="tel"],
|
27
|
-
[type="time"],
|
28
16
|
[type="url"],
|
29
17
|
select,
|
30
18
|
textarea {
|
31
19
|
@content;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
// -------------------------------
|
36
|
-
// FORM INPUT
|
37
|
-
// - Base style for text input
|
38
|
-
// -------------------------------
|
39
|
-
@mixin form-input($padding: $input-padding) {
|
40
|
-
width: 100%;
|
41
|
-
outline: none;
|
42
|
-
padding: $input-padding;
|
43
|
-
border: $input-border;
|
44
|
-
border-top: $input-border-style darken($input-border-color, 5%);
|
45
|
-
|
46
|
-
&:hover {
|
47
|
-
border: $input-border-hover;
|
48
|
-
@include box-shadow(inset 0 0 3px $input-border-color);
|
49
|
-
}
|
50
20
|
|
51
|
-
|
52
|
-
|
53
|
-
|
21
|
+
@if $style {
|
22
|
+
display: block;
|
23
|
+
width: 100%;
|
24
|
+
outline: none;
|
25
|
+
padding: 10px;
|
26
|
+
border: 1px solid $passive-color;
|
27
|
+
border-top-color: darken($passive-color, 5%);
|
28
|
+
|
29
|
+
&:hover {
|
30
|
+
border-color: darken($passive-color, 10%);
|
31
|
+
@include box-shadow(inset 0 0 3px $passive-color);
|
32
|
+
}
|
33
|
+
|
34
|
+
&:focus {
|
35
|
+
border-color: $main-color;
|
36
|
+
@include box-shadow(inset 0 1px 2px rgba(black, .2) );
|
37
|
+
}
|
38
|
+
}
|
54
39
|
}
|
55
|
-
}
|
56
|
-
|
57
|
-
// ------------------------
|
58
|
-
// FORM LABEL
|
59
|
-
// - Base style for label
|
60
|
-
// ------------------------
|
61
|
-
@mixin form-label($padding: $input-padding, $bg-color: $prefix-bg-color) {
|
62
|
-
display: block;
|
63
|
-
line-height: normal;
|
64
|
-
padding-top: $padding;
|
65
|
-
padding-bottom: $padding;
|
66
|
-
border: $input-border-style transparent; // to make it vertically centered
|
67
|
-
|
68
|
-
&.prefix,
|
69
|
-
&.postfix {
|
70
|
-
border: $input-border-style $bg-color;
|
71
|
-
border-top: $input-border-style darken( $input-border-color, 5% );
|
72
|
-
text-align: center;
|
73
|
-
color: $body-font-color;
|
74
|
-
background: $bg-color;
|
75
|
-
overflow: hidden;
|
76
|
-
}
|
77
|
-
|
78
|
-
&.prefix {
|
79
|
-
border-right: none;
|
80
|
-
}
|
81
|
-
|
82
|
-
&.postfix {
|
83
|
-
border-left: none;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
@if $include-form and not $user-mode {
|
88
|
-
|
89
|
-
/* ---------------
|
90
|
-
EDGE Form
|
91
|
-
--------------- */
|
92
|
-
|
93
|
-
@include input {
|
94
|
-
@include form-input();
|
95
|
-
}
|
96
|
-
|
97
|
-
label {
|
98
|
-
@include form-label();
|
99
|
-
}
|
100
|
-
|
101
|
-
// Disable Chrome's datepicker
|
102
|
-
input::-webkit-calendar-picker-indicator{
|
103
|
-
display: none;
|
104
|
-
}
|
105
|
-
|
106
|
-
input[type="date"]::-webkit-input-placeholder{
|
107
|
-
visibility: hidden !important;
|
108
|
-
}
|
109
40
|
|
110
|
-
}
|
41
|
+
}
|