pacem-less 0.40.3 → 0.40.4-akkad

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.
@@ -1,6 +1,7 @@
1
1
  @import "../mixins";
2
2
 
3
3
  @_card_ribbon_padding: 2 * @grid_spacing / 3;
4
+ @_radius: @border_card_radius;
4
5
 
5
6
  .@{PCSS}-card {
6
7
  .Panel(card);
@@ -28,8 +29,8 @@
28
29
  height: @_h_height;
29
30
  top: 0;
30
31
  left: 0;
31
- border-top-left-radius: @border_radius;
32
- border-top-right-radius: @border_radius;
32
+ border-top-left-radius: @_radius;
33
+ border-top-right-radius: @_radius;
33
34
  overflow: hidden;
34
35
  }
35
36
 
@@ -63,8 +64,8 @@
63
64
  .card-img {
64
65
  height: 100%;
65
66
  box-shadow: none;
66
- border-bottom-left-radius: @border_radius;
67
- border-bottom-right-radius: @border_radius;
67
+ border-bottom-left-radius: @_radius;
68
+ border-bottom-right-radius: @_radius;
68
69
  }
69
70
 
70
71
  .card-body, .card-footer {
@@ -96,9 +97,9 @@
96
97
  }
97
98
 
98
99
  .card-img {
99
- border-top-left-radius: @border_radius;
100
+ border-top-left-radius: @_radius;
100
101
  border-top-right-radius: 0;
101
- border-bottom-left-radius: @border_radius;
102
+ border-bottom-left-radius: @_radius;
102
103
  border-bottom-right-radius: 0;
103
104
  }
104
105
 
@@ -142,9 +143,9 @@
142
143
  grid-template-areas: 'img heading tools' 'img body body' 'img footer footer';
143
144
 
144
145
  .card-img {
145
- border-top-left-radius: @border_radius;
146
+ border-top-left-radius: @_radius;
146
147
  border-top-right-radius: 0;
147
- border-bottom-left-radius: @border_radius;
148
+ border-bottom-left-radius: @_radius;
148
149
  border-bottom-right-radius: 0;
149
150
  }
150
151
  }
@@ -156,9 +157,9 @@
156
157
 
157
158
  .card-img {
158
159
  border-top-left-radius: 0;
159
- border-top-right-radius: @border_radius;
160
+ border-top-right-radius: @_radius;
160
161
  border-bottom-left-radius: 0;
161
- border-bottom-right-radius: @border_radius;
162
+ border-bottom-right-radius: @_radius;
162
163
  }
163
164
 
164
165
  .card-ribbon {
@@ -211,7 +212,7 @@
211
212
  position: absolute;
212
213
  z-index: 2;
213
214
  .CardRibbon();
214
- border-radius: @border_radius;
215
+ border-radius: @_radius;
215
216
 
216
217
  &:not(.bg-default):not(.bg-error):not(.bg-accent):not(.bg-primary):not(.bg-success):not(.bg-warning):not(.bg-danger):not(.bg-invert):not(.bg-disabled) {
217
218
  background-color: @color_lightblue;
@@ -191,7 +191,7 @@
191
191
  border: @grid_spacing/3 solid #868584;
192
192
  box-shadow: inset @_brd_in_w 0 0 @_brd_in_clr, inset 0 @_brd_in_w 0 @_brd_in_clr, inset 0 -@_brd_in_w 0 @_brd_in_clr, inset -@_brd_in_w 0 0 @_brd_in_clr;
193
193
  padding: @_brd_in_w;
194
- border-radius: @border_radius;
194
+ border-radius: @border_panel_radius;
195
195
 
196
196
  .@{PCSS}-row,
197
197
  .@{PCSS}-flex {
@@ -44,8 +44,11 @@
44
44
  background-color: fade(@_clr, 10);
45
45
  }
46
46
 
47
- &.@{prefix}-corners when (@border_radius = 0) {
48
- .Corners(@_clr);
47
+ @_r0: if((@prefix = card), @border_card_radius, @border_radius);
48
+ @_r1: if((@prefix = panel), @border_panel_radius, @_r0);
49
+
50
+ &.@{prefix}-corners{ // when (@_r1 = 0) {
51
+ .Corners(@_clr, @_r1);
49
52
  }
50
53
  }
51
54
 
@@ -55,19 +58,30 @@
55
58
  }
56
59
 
57
60
  .BoxLayout(@prefix, @_clr);
58
- .CornersColorize(@_clr);
61
+ @_r0: if((@prefix = card), @border_card_radius, @border_radius);
62
+ @_r1: if((@prefix = panel), @border_panel_radius, @_r0);
63
+ .CornersColorize(@_clr, @_r1);
59
64
  }
60
65
 
61
- .CornersSize() {
66
+ /*.CornersSize() {
62
67
  .CornersSize(@grid_spacing/4;);
63
- }
68
+ }*/
64
69
 
65
- .CornersSize(@_sz) when (@border_radius = 0) {
70
+ .CornersSize(@_sz) /*when (@border_radius = 0)*/ {
66
71
 
67
72
  .corner {
68
- width: @_sz;
69
- height: @_sz;
70
- border-radius: @border_radius;
73
+
74
+ &when (@_sz > 0) {
75
+ width: @_sz * 2;
76
+ height: $width;
77
+ border-radius: 50%;
78
+ }
79
+
80
+ &when (@_sz <= 0) {
81
+ width: 6px;
82
+ height: $width;
83
+ }
84
+
71
85
  border: 1px solid transparent;
72
86
  position: absolute;
73
87
  pointer-events: none;
@@ -75,53 +89,79 @@
75
89
  &.top-left {
76
90
  top: -1px;
77
91
  left: -1px;
92
+
93
+ &when (@_sz > 0) {
94
+ transform: rotate(-45deg);
95
+ }
78
96
  }
79
97
 
80
98
  &.top-right {
81
99
  top: -1px;
82
100
  right: -1px;
101
+
102
+ &when (@_sz > 0) {
103
+ transform: rotate(45deg);
104
+ }
83
105
  }
84
106
 
85
107
  &.bottom-right {
86
108
  bottom: -1px;
87
109
  right: -1px;
110
+
111
+ &when (@_sz > 0) {
112
+ transform: rotate(135deg);
113
+ }
88
114
  }
89
115
 
90
116
  &.bottom-left {
91
117
  bottom: -1px;
92
118
  left: -1px;
119
+
120
+ &when (@_sz > 0) {
121
+ transform: rotate(-135deg);
122
+ }
93
123
  }
94
124
  }
95
125
 
96
- .corner when (@border_radius > @_sz/2) {
97
- /*@_sz: @border_radius * 2;
98
- width: @_sz;
99
- height: @_sz;
100
- border-radius: 50%;*/
101
- visibility: hidden;
126
+ .corner /*when (@border_radius > @_sz/2)*/ {
127
+ /* deprecated */
128
+ //visibility: hidden;
102
129
  }
103
130
  }
104
131
 
105
- .CornersColorize(@_clr) when (@border_radius = 0) {
132
+ .CornersColorize(@_clr, @_radius) /*when (@border_radius = 0)*/ {
106
133
  .corner {
107
- &.top-left {
108
- border-top-color: @_clr;
109
- border-left-color: @_clr;
110
- }
111
134
 
112
- &.top-right {
135
+ &when (@_radius > 0) {
113
136
  border-top-color: @_clr;
114
- border-right-color: @_clr;
115
137
  }
116
138
 
117
- &.bottom-right {
118
- border-bottom-color: @_clr;
119
- border-right-color: @_clr;
120
- }
139
+ &when (@_radius <= 0) {
121
140
 
122
- &.bottom-left {
123
- border-bottom-color: @_clr;
124
- border-left-color: @_clr;
141
+ // reset
142
+ border-top-color: transparent;
143
+ border-radius: 0;
144
+ transform: none;
145
+
146
+ &.top-left {
147
+ border-top-color: @_clr;
148
+ border-left-color: @_clr;
149
+ }
150
+
151
+ &.top-right {
152
+ border-top-color: @_clr;
153
+ border-right-color: @_clr;
154
+ }
155
+
156
+ &.bottom-right {
157
+ border-bottom-color: @_clr;
158
+ border-right-color: @_clr;
159
+ }
160
+
161
+ &.bottom-left {
162
+ border-bottom-color: @_clr;
163
+ border-left-color: @_clr;
164
+ }
125
165
  }
126
166
  }
127
167
  }
@@ -153,12 +193,32 @@
153
193
  .Panel(@prefix) {
154
194
  padding: 0 /*0 @grid_spacing/4 0*/;
155
195
  text-rendering: optimizeSpeed;
156
- border-radius: @border_radius;
157
196
  border: 1px solid transparent;
158
197
  box-sizing: border-box;
159
198
  position: relative;
160
- .CornersSize();
161
- .CornersColorize(@color_default);
199
+
200
+ @_r0: if((@prefix = card), @border_card_radius, @border_radius);
201
+ @_r1: if((@prefix = panel), @border_panel_radius, @_r0);
202
+
203
+ border-radius: @_r1;
204
+ .CornersSize(@_r1);
205
+ .CornersColorize(@color_default, @_r1);
206
+ /*border-radius: @border_radius;
207
+ .CornersSize(@border_radius);
208
+ .CornersColorize(@color_default, @border_radius);
209
+
210
+ &when (@prefix = panel) {
211
+ border-radius: @border_panel_radius;
212
+ .CornersSize(@border_panel_radius);
213
+ .CornersColorize(@color_default,@border_panel_radius);
214
+ }
215
+
216
+ &when (@prefix = card) {
217
+ border-radius: @border_card_radius;
218
+ .CornersSize(@border_card_radius);
219
+ .CornersColorize(@color_default,@border_card_radius);
220
+ }*/
221
+
162
222
 
163
223
  @_min_height: @grid_spacing;
164
224
 
@@ -249,7 +309,7 @@
249
309
  &.fill-@{value}{
250
310
  color: ~"var(--@{PCSS}-color-@{value}-inverse)";
251
311
  // border-color: ~"var(--@{PCSS}-color-@{value}-inverse)";
252
- .CornersColorize(~"var(--@{PCSS}-color-@{value}-inverse)");
312
+ .CornersColorize(~"var(--@{PCSS}-color-@{value}-inverse)", @_r1);
253
313
 
254
314
  .@{prefix}-body,
255
315
  .@{prefix}-footer,
@@ -264,7 +324,7 @@
264
324
  &.fill-@{value}-container{
265
325
  color: ~"var(--@{PCSS}-color-@{value}-container-inverse)";
266
326
  // border-color: ~"var(--@{PCSS}-color-@{value}-container-inverse)";
267
- .CornersColorize(~"var(--@{PCSS}-color-@{value}-container-inverse)");
327
+ .CornersColorize(~"var(--@{PCSS}-color-@{value}-container-inverse)", @_r1);
268
328
 
269
329
  .@{prefix}-heading,
270
330
  .@{prefix}-body,
@@ -213,13 +213,16 @@
213
213
  @button_hover_percentage: 5;
214
214
  @button_fontfamily: @font_std;
215
215
  @button_fontsize: 1.1rem * @font_rem_factor;
216
-
216
+ @border_button_radius: @border_radius;
217
217
  /*#endregion*/
218
218
 
219
219
  /*#region UI VARIABLES*/
220
220
 
221
221
  @color_link: @color_primary;
222
222
 
223
+ @border_panel_radius: @border_radius;
224
+ @border_card_radius: @border_panel_radius;
225
+
223
226
  // datatables
224
227
  @datarow_color: transparent;
225
228
  @datarow_hover_color: fade(@color_border, 5);
@@ -6,6 +6,7 @@
6
6
  @_width_half: @grid_cell + 2 * @_side_padding;
7
7
  @_height: @grid_spacing * 1.5;
8
8
  @_border: 1px;
9
+ @_radius: @border_button_radius;
9
10
 
10
11
  .@{PCSS}-button.button,
11
12
  @{P}-button.button {
@@ -22,7 +23,7 @@
22
23
  //margin: 0 @_margin @_margin 0;
23
24
  transition: all .1s linear;
24
25
  //color: @color_light;
25
- border-radius: @border_radius;
26
+ border-radius: @_radius;
26
27
 
27
28
  &.button-size {
28
29
  padding: 0 @grid_spacing/2;
@@ -338,7 +339,7 @@ a.@{PCSS}-button,
338
339
  }
339
340
 
340
341
  &.button-square {
341
- border-radius: @border_radius;
342
+ border-radius: @_radius;
342
343
 
343
344
  &.square-sharp {
344
345
  border-radius: 0;
@@ -51,6 +51,10 @@
51
51
  .Sidebar(@color_primary, @color_primary_inv);
52
52
  }
53
53
 
54
+ &.sidebar-secondary {
55
+ .Sidebar(@color_secondary, @color_secondary_inv);
56
+ }
57
+
54
58
  &.sidebar-accent {
55
59
  .Sidebar(@color_accent, @color_accent_inv);
56
60
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.3",
2
+ "version": "0.40.4-akkad",
3
3
  "name": "pacem-less",
4
4
  "homepage": "https://js.pacem.it",
5
5
  "repository": {
package/shared.less CHANGED
@@ -23,23 +23,33 @@
23
23
  .Blur(@radius);
24
24
  }
25
25
 
26
- .Grayscale(){
26
+ .Grayscale() {
27
27
  filter: grayscale(100%);
28
28
  }
29
29
 
30
30
  .Corners(@clr) {
31
- .Corners(@clr, 6);
31
+ .Corners(@clr, 0);
32
32
  }
33
33
 
34
34
  .Corners(@clr, @sz) {
35
- @sz2: unit(@sz + .5);
36
35
  @brd2: rgba(red(@clr), green(@clr), blue(@clr), min(.99, alpha(@clr)));
37
- @render: /*'geometricPrecision';*/ 'crispEdges';
36
+ @strk: 2;
37
+ @render: 'geometricPrecision'; /*'crispEdges';*/
38
+
39
+ &when(@sz = 0) {
40
+ @sz2: 6;
41
+ background-size: unit(@sz2, px);
42
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M0,@{sz2} V0 H@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M0,0 H@{sz2} V@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M@{sz2},0 V@{sz2} H0'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M@{sz2},@{sz2} H0 V0'%3E%3C/path%3E%3C/svg%3E");
43
+ }
44
+
45
+ &when(@sz > 0) {
46
+ @sz2: unit(@sz);
47
+ background-size: unit(@sz2, px);
48
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M0,@{sz2} a@{sz2},@{sz2} 0 0,1 @{sz2},-@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M0,0 a@{sz2},@{sz2} 0 0,1 @{sz2},@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M@{sz2},0 a@{sz2},@{sz2} 0 0,1 -@{sz2},@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='@{sz2}' height='@{sz2}' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='@{strk}' d='M@{sz2},@{sz2} a@{sz2},@{sz2} 0 0,1 -@{sz2},-@{sz2}'%3E%3C/path%3E%3C/svg%3E");
49
+ }
38
50
 
39
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='1' d='M0,@{sz2} V0 H@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='1' d='M0,0 H@{sz2} V@{sz2}'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='1' d='M@{sz2},0 V@{sz2} H0'%3E%3C/path%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 @{sz2} @{sz2}'%3E%3Cpath shape-rendering='@{render}' stroke='@{brd2}' fill='transparent' stroke-width='1' d='M@{sz2},@{sz2} H0 V0'%3E%3C/path%3E%3C/svg%3E");
40
51
  background-position: top left, top right, bottom right, bottom left;
41
52
  background-repeat: no-repeat;
42
- background-size: unit(@sz, px);
43
53
  background-origin: border-box;
44
54
 
45
55
  &.corners-safe {