@castlabs/ui 7.0.11 → 7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castlabs/ui",
3
- "version": "7.0.11",
3
+ "version": "7.1.0",
4
4
  "repository": "https://github.com/castlabs/ui-styleguide",
5
5
  "private": false,
6
6
  "description": "A vanilla HTML/CS/JS & Vue.js component library for Castlabs.",
@@ -2,7 +2,6 @@ $badge-color-fg: $color-ci-white;
2
2
  $badge-color-bg: $color-dark;
3
3
  $badge-padding: px(4) px(8);
4
4
  $badge-min-height: 1.642857143em; // 23px @ 14pt
5
- $badge-baseline-shift: 0.055555em; // 1px @ 14pt
6
5
 
7
6
  @mixin cl-badge-small {
8
7
  font-size: px(12);
@@ -39,8 +39,7 @@
39
39
  line-height: 1; // repeat as @include overrides
40
40
  opacity: 1;
41
41
  overflow: hidden;
42
- padding: typography-sans-baselineshift($spacing-tiny, px(14)) $spacing-medium
43
- typography-sans-baselineunshift($spacing-tiny, px(14));
42
+ padding: px(7) $spacing-medium;
44
43
  }
45
44
  }
46
45
 
@@ -179,8 +179,7 @@ $card-spacing-tight: $spacing-small;
179
179
 
180
180
  %cl-tight {
181
181
  .card-header {
182
- padding: typography-sans-baselineshift($card-spacing-tight * 0.75, px(16)) $card-spacing-tight
183
- typography-sans-baselineunshift($card-spacing-tight * 0.75, px(16));
182
+ padding: $card-spacing-tight * 0.75 $card-spacing-tight;
184
183
  }
185
184
 
186
185
  .card-body {
@@ -83,6 +83,10 @@ main {
83
83
  }
84
84
  }
85
85
 
86
+ ol.cl-list {
87
+ @extend %cl-list-number;
88
+ }
89
+
86
90
  // --- definition lists --------------------------------------------------------
87
91
 
88
92
  .cl-dl {
@@ -88,6 +88,26 @@ $list-indent: $spacing-large;
88
88
  }
89
89
  }
90
90
 
91
+ %cl-list-number {
92
+ counter-reset: item;
93
+
94
+ li {
95
+ margin-left: -$spacing-micro;
96
+
97
+ &::before {
98
+ @extend %cl-p-pre;
99
+
100
+ color: var(--cl-color-accent);
101
+ content: counter(item) '.';
102
+ counter-increment: item;
103
+ font-size: px(16);
104
+ font-weight: 700;
105
+ margin-right: $spacing-micro;
106
+ position: static;
107
+ text-align: end;
108
+ }
109
+ }
110
+ }
91
111
  // -----------------------------------------------------------------------------
92
112
 
93
113
  $list-dt-width: 14rem;
@@ -13,8 +13,7 @@
13
13
  line-height: 1; // repeat as @include overrides
14
14
  opacity: 1;
15
15
  overflow: hidden;
16
- padding: typography-sans-baselineshift($spacing-tiny, px(18)) $spacing-large
17
- typography-sans-baselineunshift($spacing-tiny, px(18));
16
+ padding: $spacing-tiny $spacing-large;
18
17
  text-align: center;
19
18
  text-decoration: none;
20
19
  transition: opacity 0.15s;
@@ -17,6 +17,7 @@
17
17
  @extend %cl-color-night-outline;
18
18
  }
19
19
 
20
+ .cl-color-primary,
20
21
  .cl-color-red {
21
22
  @extend %cl-color-red;
22
23
  }
@@ -29,6 +30,7 @@
29
30
  @extend %cl-color-sky;
30
31
  }
31
32
 
33
+ .cl-color-secondary,
32
34
  .cl-color-black,
33
35
  .cl-color-text, // legacy name
34
36
  .cl-color-dark, // legacy name
@@ -0,0 +1,11 @@
1
+ ////
2
+ /// @group layout
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines tweaks scrollbars for rounded boxes and uses our CI colors.
7
+
8
+ main,
9
+ .cl-section {
10
+ scrollbar-color: $color-ci-clay transparent;
11
+ }
@@ -183,12 +183,10 @@ main {
183
183
 
184
184
  // --- code & monospace --------------------------------------------------------
185
185
 
186
- pre,
187
186
  kbd,
188
187
  code,
189
188
  samp {
190
189
  @extend %cl-p-pre;
191
- @include cl-color-focus-outline;
192
190
 
193
191
  color: var(--cl-color-text);
194
192
  }
@@ -199,7 +197,8 @@ main {
199
197
  }
200
198
 
201
199
  pre {
202
- padding: $spacing-tiny;
200
+ @extend %cl-p-pre-box;
201
+ @include cl-color-focus-outline;
203
202
 
204
203
  code {
205
204
  padding: 0;
@@ -37,14 +37,6 @@ $typography-monospace-line-height: 1.375;
37
37
 
38
38
  // --- helpers -----------------------------------------------------------------
39
39
 
40
- @function typography-sans-baselineshift($value, $base) {
41
- @return $value;
42
- }
43
-
44
- @function typography-sans-baselineunshift($value, $base) {
45
- @return $value;
46
- }
47
-
48
40
  @mixin typography-font(
49
41
  $font-family: $typography-sans-font-list,
50
42
  $font-weight: 400,
@@ -459,12 +451,15 @@ $typography-responsive-scale: 0.8;
459
451
 
460
452
  %cl-p-pre-box {
461
453
  @extend %cl-p-pre;
462
- border-radius: $brand-border-radius;
454
+
463
455
  border: $brand-line-width solid var(--cl-color-text);
456
+ border-radius: $brand-border-radius;
457
+ clip-path: inset(0 round 19px);
464
458
  font-size: px(16);
465
- line-height: 1;
459
+ line-height: 1.4;
466
460
  margin-top: $spacing-small;
467
461
  padding: $spacing-small;
462
+ padding-bottom: 1.01rem; // fix for overlapping scrollbar
468
463
  }
469
464
 
470
465
  %cl-p-tag {
@@ -17,11 +17,12 @@ $castlabs-ui-asset-prefix: '..' !default;
17
17
  @import 'assets/fontawesome';
18
18
  @import 'global';
19
19
 
20
- @import 'layout/app';
21
20
  @import 'layout/animation';
21
+ @import 'layout/app';
22
22
  @import 'layout/color';
23
23
  @import 'layout/grid';
24
24
  @import 'layout/helper';
25
+ @import 'layout/scrollbar';
25
26
  @import 'layout/section';
26
27
  @import 'layout/spacing';
27
28
  @import 'layout/typography';