spectre_scss 0.4.7.0 → 0.5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ea1d1c484c013cf10eefca580489847af1dd951
4
- data.tar.gz: c162d74dbea4ab72fd64452d810d1756d7b62ebf
3
+ metadata.gz: 4ba4c16258024296594089eef45fe2e75e06fa34
4
+ data.tar.gz: 4df599e5e4f8632f4fb7d7ba5ef24f10c5d88d2a
5
5
  SHA512:
6
- metadata.gz: ec24b709043beb84abbf250c2fe0346d0e6670f1fd356dcf3b4c2f5a92e8579fc6f2bf26ac7b52c2fdb698c4810332c339520d63ad529b0fabb2dc10e77ddb34
7
- data.tar.gz: 77aedf675b407e0e5e778039892bb9a22e3c9ce38cd7f9069779627c6ef03e167f83b9742b8e5856aafb1562d9f4dc324a53d5b2728b9a8b286df51a8307140b
6
+ metadata.gz: 9d278869d2d61cde30e2fc67dd5df92e569179fa728ba27b0f4167ef5d6af6caa6710531cec22b56b3e97c160aa0b031bf06bfea913a0818dfda28703515cd02
7
+ data.tar.gz: 1cbdfd28b2d4865ccfe6c4270abfb6d7744dd8f1e22f79f3e7879d7d763b121864118596df55ae2bc620a2863a8cea4dded3d7fcb2e845d965d3121e2929bad3
@@ -1,3 +1,3 @@
1
1
  module SpectreScss
2
- VERSION = '0.4.7.0'
2
+ VERSION = '0.5.0.0'
3
3
  end
@@ -22,10 +22,12 @@ legend {
22
22
  padding: $control-padding-y + $border-width 0;
23
23
 
24
24
  &.label-sm {
25
+ font-size: $font-size-sm;
25
26
  padding: $control-padding-y-sm + $border-width 0;
26
27
  }
27
28
 
28
29
  &.label-lg {
30
+ font-size: $font-size-lg;
29
31
  padding: $control-padding-y-lg + $border-width 0;
30
32
  }
31
33
  }
@@ -192,7 +194,9 @@ textarea.form-input {
192
194
  .form-switch {
193
195
  display: inline-block;
194
196
  line-height: $line-height;
195
- padding: (($control-size-sm - $line-height) / 2) ($control-icon-size + $control-padding-x);
197
+ margin: ($control-size - $control-size-sm) / 2 0;
198
+ min-height: 1.2rem;
199
+ padding: (($control-size-sm - $line-height) / 2) $control-padding-x (($control-size-sm - $line-height) / 2) ($control-icon-size + $control-padding-x);
196
200
  position: relative;
197
201
 
198
202
  input {
@@ -219,6 +223,17 @@ textarea.form-input {
219
223
  display: inline-block;
220
224
  position: absolute;
221
225
  }
226
+
227
+ // Input checkbox, radio and switch sizes
228
+ &.input-sm {
229
+ font-size: $font-size-sm;
230
+ margin: 0;
231
+ }
232
+
233
+ &.input-lg {
234
+ font-size: $font-size-lg;
235
+ margin: ($control-size-lg - $control-size-sm) / 2 0;
236
+ }
222
237
  }
223
238
 
224
239
  .form-checkbox,
@@ -349,11 +364,13 @@ textarea.form-input {
349
364
  border-radius: $border-radius;
350
365
  line-height: $line-height;
351
366
  padding: $control-padding-y $control-padding-x;
367
+ white-space: nowrap;
352
368
 
353
369
  &.addon-sm {
354
370
  font-size: $font-size-sm;
355
371
  padding: $control-padding-y-sm $control-padding-x-sm;
356
372
  }
373
+
357
374
  &.addon-lg {
358
375
  font-size: $font-size-lg;
359
376
  padding: $control-padding-y-lg $control-padding-x-lg;
@@ -505,10 +522,4 @@ input {
505
522
  .form-group {
506
523
  display: flex;
507
524
  }
508
-
509
- .form-checkbox,
510
- .form-radio,
511
- .form-switch {
512
- margin: ($control-size - $control-size-sm) / 2 0;
513
- }
514
525
  }
@@ -1,187 +1,11 @@
1
1
  // Mixins
2
- // Avatar mixin
3
- @mixin avatar-base($size: $unit-8) {
4
- font-size: $size / 2;
5
- height: $size;
6
- width: $size;
7
- }
8
-
9
- // Background color utility mixin
10
- @mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) {
11
- #{$name} {
12
- background: $color;
13
-
14
- @if (lightness($color) < 60) {
15
- color: $light-color;
16
- }
17
- }
18
- }
19
-
20
- // Button variant mixin
21
- @mixin button-variant($color: $primary-color) {
22
- background: $color;
23
- border-color: darken($color, 3%);
24
- color: $light-color;
25
- &:focus {
26
- @include control-shadow($color);
27
- }
28
- &:focus,
29
- &:hover {
30
- background: darken($color, 2%);
31
- border-color: darken($color, 5%);
32
- color: $light-color;
33
- }
34
- &:active,
35
- &.active {
36
- background: darken($color, 7%);
37
- border-color: darken($color, 10%);
38
- color: $light-color;
39
- }
40
- &.loading {
41
- @extend .btn-primary.loading;
42
- }
43
- }
44
-
45
- @mixin button-outline-variant($color: $primary-color) {
46
- background: $light-color;
47
- border-color: $color;
48
- color: $color;
49
- &:focus {
50
- @include control-shadow($color);
51
- }
52
- &:focus,
53
- &:hover {
54
- background: lighten($color, 50%);
55
- border-color: darken($color, 2%);
56
- color: $color;
57
- }
58
- &:active,
59
- &.active {
60
- background: $color;
61
- border-color: darken($color, 5%);
62
- color: $light-color;
63
- }
64
- &.loading {
65
- &::after {
66
- border-bottom-color: $color;
67
- border-left-color: $color;
68
- }
69
- }
70
- }
71
-
72
- // Clearfix mixin
73
- @mixin clearfix() {
74
- &::after {
75
- clear: both;
76
- content: "";
77
- display: table;
78
- }
79
- }
80
-
81
- // Component focus shadow
82
- @mixin control-shadow($color: $primary-color) {
83
- box-shadow: 0 0 0 .1rem rgba($color, .2);
84
- }
85
-
86
- // Component transition
87
- @mixin control-transition() {
88
- transition: all .2s ease;
89
- }
90
-
91
- // Label base style
92
- @mixin label-base() {
93
- border-radius: $border-radius;
94
- line-height: 1.2;
95
- padding: .1rem .15rem;
96
- }
97
-
98
- @mixin label-variant($color: $light-color, $bg-color: $primary-color) {
99
- background: $bg-color;
100
- color: $color;
101
- }
102
-
103
- // Margin utility mixin
104
- @mixin margin-variant($id: 1, $size: $unit-1) {
105
- .m-#{$id} {
106
- margin: $size;
107
- }
108
- .mb-#{$id} {
109
- margin-bottom: $size;
110
- }
111
- .ml-#{$id} {
112
- margin-left: $size;
113
- }
114
- .mr-#{$id} {
115
- margin-right: $size;
116
- }
117
- .mt-#{$id} {
118
- margin-top: $size;
119
- }
120
- .mx-#{$id} {
121
- margin-left: $size;
122
- margin-right: $size;
123
- }
124
- .my-#{$id} {
125
- margin-bottom: $size;
126
- margin-top: $size;
127
- }
128
- }
129
-
130
- // Padding utility mixin
131
- @mixin padding-variant($id: 1, $size: $unit-1) {
132
- .p-#{$id} {
133
- padding: $size;
134
- }
135
- .pb-#{$id} {
136
- padding-bottom: $size;
137
- }
138
- .pl-#{$id} {
139
- padding-left: $size;
140
- }
141
- .pr-#{$id} {
142
- padding-right: $size;
143
- }
144
- .pt-#{$id} {
145
- padding-top: $size;
146
- }
147
- .px-#{$id} {
148
- padding-left: $size;
149
- padding-right: $size;
150
- }
151
- .py-#{$id} {
152
- padding-bottom: $size;
153
- padding-top: $size;
154
- }
155
- }
156
-
157
- // Shadow mixin
158
- @mixin shadow-variant($offset) {
159
- box-shadow: 0 $offset ($offset + .05rem) * 2 rgba($dark-color, .3);
160
- }
161
-
162
- // Text color utility mixin
163
- @mixin text-color-variant($name: ".text-primary", $color: $primary-color) {
164
- #{$name} {
165
- color: $color;
166
- }
167
-
168
- a#{$name} {
169
- &:focus,
170
- &:hover {
171
- color: darken($color, 5%);
172
- }
173
- }
174
- }
175
-
176
- // Text Ellipsis
177
- @mixin text-ellipsis() {
178
- overflow: hidden;
179
- text-overflow: ellipsis;
180
- white-space: nowrap;
181
- }
182
-
183
- // Toast variant mixin
184
- @mixin toast-variant($color: $dark-color) {
185
- background: rgba($color, .9);
186
- border-color: $color;
187
- }
2
+ @import "mixins/avatar";
3
+ @import "mixins/button";
4
+ @import "mixins/clearfix";
5
+ @import "mixins/color";
6
+ @import "mixins/label";
7
+ @import "mixins/position";
8
+ @import "mixins/shadow";
9
+ @import "mixins/text";
10
+ @import "mixins/toast";
11
+ @import "mixins/transition";
@@ -10,7 +10,7 @@
10
10
  display: flex;
11
11
  flex: 1 0 0;
12
12
 
13
- &:last-child {
13
+ &:not(:first-child):last-child {
14
14
  justify-content: flex-end;
15
15
  }
16
16
  }
@@ -8,6 +8,15 @@ $off-canvas-breakpoint: $size-lg !default;
8
8
  position: relative;
9
9
  width: 100%;
10
10
 
11
+ .off-canvas-toggle {
12
+ display: block;
13
+ left: $layout-spacing;
14
+ position: absolute;
15
+ top: $layout-spacing;
16
+ transition: none;
17
+ z-index: $zindex-0;
18
+ }
19
+
11
20
  .off-canvas-sidebar {
12
21
  background: $bg-color;
13
22
  bottom: 0;
@@ -53,32 +62,21 @@ $off-canvas-breakpoint: $size-lg !default;
53
62
  z-index: $zindex-2;
54
63
  }
55
64
  }
56
-
57
- .off-canvas-toggle {
58
- display: block;
59
- left: $layout-spacing;
60
- position: absolute;
61
- top: $layout-spacing;
62
- transition: none;
63
- z-index: $zindex-0;
64
- }
65
65
  }
66
66
 
67
67
  // Responsive layout
68
68
  @media (min-width: $off-canvas-breakpoint) {
69
69
  .off-canvas {
70
- .off-canvas-sidebar {
71
- flex: 0 0 auto;
72
- position: relative;
73
- transform: none;
74
- }
75
-
76
- .off-canvas-content {
77
- padding-left: $layout-spacing-lg;
78
- }
79
-
80
- .off-canvas-toggle {
81
- display: none;
70
+ &.off-canvas-sidebar-show {
71
+ .off-canvas-toggle {
72
+ display: none;
73
+ }
74
+
75
+ .off-canvas-sidebar {
76
+ flex: 0 0 auto;
77
+ position: relative;
78
+ transform: none;
79
+ }
82
80
  }
83
81
  }
84
82
  }
@@ -1,5 +1,5 @@
1
1
  // Core variables
2
- $version: "0.4.7";
2
+ $version: "0.5.0";
3
3
 
4
4
  // Core colors
5
5
  $primary-color: #5755d9 !default;
@@ -0,0 +1,6 @@
1
+ // Avatar mixin
2
+ @mixin avatar-base($size: $unit-8) {
3
+ font-size: $size / 2;
4
+ height: $size;
5
+ width: $size;
6
+ }
@@ -0,0 +1,51 @@
1
+ // Button variant mixin
2
+ @mixin button-variant($color: $primary-color) {
3
+ background: $color;
4
+ border-color: darken($color, 3%);
5
+ color: $light-color;
6
+ &:focus {
7
+ @include control-shadow($color);
8
+ }
9
+ &:focus,
10
+ &:hover {
11
+ background: darken($color, 2%);
12
+ border-color: darken($color, 5%);
13
+ color: $light-color;
14
+ }
15
+ &:active,
16
+ &.active {
17
+ background: darken($color, 7%);
18
+ border-color: darken($color, 10%);
19
+ color: $light-color;
20
+ }
21
+ &.loading {
22
+ @extend .btn-primary.loading;
23
+ }
24
+ }
25
+
26
+ @mixin button-outline-variant($color: $primary-color) {
27
+ background: $light-color;
28
+ border-color: $color;
29
+ color: $color;
30
+ &:focus {
31
+ @include control-shadow($color);
32
+ }
33
+ &:focus,
34
+ &:hover {
35
+ background: lighten($color, 50%);
36
+ border-color: darken($color, 2%);
37
+ color: $color;
38
+ }
39
+ &:active,
40
+ &.active {
41
+ background: $color;
42
+ border-color: darken($color, 5%);
43
+ color: $light-color;
44
+ }
45
+ &.loading {
46
+ &::after {
47
+ border-bottom-color: $color;
48
+ border-left-color: $color;
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,8 @@
1
+ // Clearfix mixin
2
+ @mixin clearfix() {
3
+ &::after {
4
+ clear: both;
5
+ content: "";
6
+ display: table;
7
+ }
8
+ }
@@ -0,0 +1,24 @@
1
+ // Background color utility mixin
2
+ @mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) {
3
+ #{$name} {
4
+ background: $color;
5
+
6
+ @if (lightness($color) < 60) {
7
+ color: $light-color;
8
+ }
9
+ }
10
+ }
11
+
12
+ // Text color utility mixin
13
+ @mixin text-color-variant($name: ".text-primary", $color: $primary-color) {
14
+ #{$name} {
15
+ color: $color;
16
+ }
17
+
18
+ a#{$name} {
19
+ &:focus,
20
+ &:hover {
21
+ color: darken($color, 5%);
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,11 @@
1
+ // Label base style
2
+ @mixin label-base() {
3
+ border-radius: $border-radius;
4
+ line-height: 1.2;
5
+ padding: .1rem .15rem;
6
+ }
7
+
8
+ @mixin label-variant($color: $light-color, $bg-color: $primary-color) {
9
+ background: $bg-color;
10
+ color: $color;
11
+ }
@@ -0,0 +1,65 @@
1
+ // Margin utility mixin
2
+ @mixin margin-variant($id: 1, $size: $unit-1) {
3
+ .m-#{$id} {
4
+ margin: $size;
5
+ }
6
+
7
+ .mb-#{$id} {
8
+ margin-bottom: $size;
9
+ }
10
+
11
+ .ml-#{$id} {
12
+ margin-left: $size;
13
+ }
14
+
15
+ .mr-#{$id} {
16
+ margin-right: $size;
17
+ }
18
+
19
+ .mt-#{$id} {
20
+ margin-top: $size;
21
+ }
22
+
23
+ .mx-#{$id} {
24
+ margin-left: $size;
25
+ margin-right: $size;
26
+ }
27
+
28
+ .my-#{$id} {
29
+ margin-bottom: $size;
30
+ margin-top: $size;
31
+ }
32
+ }
33
+
34
+ // Padding utility mixin
35
+ @mixin padding-variant($id: 1, $size: $unit-1) {
36
+ .p-#{$id} {
37
+ padding: $size;
38
+ }
39
+
40
+ .pb-#{$id} {
41
+ padding-bottom: $size;
42
+ }
43
+
44
+ .pl-#{$id} {
45
+ padding-left: $size;
46
+ }
47
+
48
+ .pr-#{$id} {
49
+ padding-right: $size;
50
+ }
51
+
52
+ .pt-#{$id} {
53
+ padding-top: $size;
54
+ }
55
+
56
+ .px-#{$id} {
57
+ padding-left: $size;
58
+ padding-right: $size;
59
+ }
60
+
61
+ .py-#{$id} {
62
+ padding-bottom: $size;
63
+ padding-top: $size;
64
+ }
65
+ }
@@ -0,0 +1,9 @@
1
+ // Component focus shadow
2
+ @mixin control-shadow($color: $primary-color) {
3
+ box-shadow: 0 0 0 .1rem rgba($color, .2);
4
+ }
5
+
6
+ // Shadow mixin
7
+ @mixin shadow-variant($offset) {
8
+ box-shadow: 0 $offset ($offset + .05rem) * 2 rgba($dark-color, .3);
9
+ }
@@ -0,0 +1,6 @@
1
+ // Text Ellipsis
2
+ @mixin text-ellipsis() {
3
+ overflow: hidden;
4
+ text-overflow: ellipsis;
5
+ white-space: nowrap;
6
+ }
@@ -0,0 +1,5 @@
1
+ // Toast variant mixin
2
+ @mixin toast-variant($color: $dark-color) {
3
+ background: rgba($color, .9);
4
+ border-color: $color;
5
+ }
@@ -0,0 +1,4 @@
1
+ // Component transition
2
+ @mixin control-transition() {
3
+ transition: all .2s ease;
4
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectre_scss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7.0
4
+ version: 0.5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -124,6 +124,16 @@ files:
124
124
  - vendor/assets/stylesheets/spectre/icons/_icons-core.scss
125
125
  - vendor/assets/stylesheets/spectre/icons/_icons-navigation.scss
126
126
  - vendor/assets/stylesheets/spectre/icons/_icons-object.scss
127
+ - vendor/assets/stylesheets/spectre/mixins/_avatar.scss
128
+ - vendor/assets/stylesheets/spectre/mixins/_button.scss
129
+ - vendor/assets/stylesheets/spectre/mixins/_clearfix.scss
130
+ - vendor/assets/stylesheets/spectre/mixins/_color.scss
131
+ - vendor/assets/stylesheets/spectre/mixins/_label.scss
132
+ - vendor/assets/stylesheets/spectre/mixins/_position.scss
133
+ - vendor/assets/stylesheets/spectre/mixins/_shadow.scss
134
+ - vendor/assets/stylesheets/spectre/mixins/_text.scss
135
+ - vendor/assets/stylesheets/spectre/mixins/_toast.scss
136
+ - vendor/assets/stylesheets/spectre/mixins/_transition.scss
127
137
  - vendor/assets/stylesheets/spectre/spectre-exp.scss
128
138
  - vendor/assets/stylesheets/spectre/spectre-icons.scss
129
139
  - vendor/assets/stylesheets/spectre/spectre.scss