@soxa-ui/theme-base 0.3.0-beta.1 → 0.3.1-beta.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/README.md CHANGED
@@ -398,3 +398,8 @@ the application uses Tailwind, name the order before any stylesheet loads, so th
398
398
  ## License
399
399
 
400
400
  [MIT](https://github.com/youra-h/soxa-ui/blob/main/LICENSE)
401
+
402
+ ## Breadcrumbs
403
+
404
+ Breadcrumbs provides an ordered navigation trail with native links, localized accessible names
405
+ and an overflow menu. See the [API and examples](../../../docs/api/breadcrumbs.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soxa-ui/theme-base",
3
- "version": "0.3.0-beta.1",
3
+ "version": "0.3.1-beta.0",
4
4
  "description": "Общий слой тем Soxa UI: сброс частей библиотеки, знак направления письма и структура частей с числами в переменных — чистый CSS, без препроцессора, — и плагины раскладки для поведения темы",
5
5
  "keywords": [
6
6
  "soxa",
@@ -47,8 +47,8 @@
47
47
  "test": "vitest run"
48
48
  },
49
49
  "peerDependencies": {
50
- "@soxa-ui/core": "^0.3.0-beta.1",
51
- "@soxa-ui/plugins": "^0.3.0-beta.1"
50
+ "@soxa-ui/core": "^0.4.0-beta.0",
51
+ "@soxa-ui/plugins": "^0.4.0-beta.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "postcss": "^8.5.9",
@@ -0,0 +1,19 @@
1
+ /* A centered confirmation uses the shared modal anatomy and its own size contract. */
2
+ :root {
3
+ --so-alert-dialog-width: 32rem;
4
+ --so-alert-dialog-height: fit-content;
5
+ --so-alert-dialog-offset: 1rem;
6
+ }
7
+
8
+ .so-alert-dialog {
9
+ position: fixed;
10
+ inset: var(--so-alert-dialog-offset);
11
+ margin: auto;
12
+ grid-template-columns: minmax(0, 1fr) auto;
13
+ grid-template-rows: auto minmax(0, 1fr) auto;
14
+ grid-template-areas: 'title close' 'body body' 'footer footer';
15
+ width: var(--so-alert-dialog-width);
16
+ height: var(--so-alert-dialog-height);
17
+ max-width: calc(100% - 2 * var(--so-alert-dialog-offset));
18
+ max-height: calc(100% - 2 * var(--so-alert-dialog-offset));
19
+ }
@@ -0,0 +1,116 @@
1
+ /* Geometry stays independent of the theme's colors and visual variants. */
2
+ :root {
3
+ --so-alert-padding: 1rem;
4
+ --so-alert-gap: 0.75rem;
5
+ --so-alert-icon-size: 1.25em;
6
+ --so-alert-close-size: var(--so-button-height-sm);
7
+ }
8
+
9
+ .so-alert {
10
+ display: grid;
11
+ grid-template-columns: minmax(0, 1fr);
12
+ align-items: start;
13
+ column-gap: var(--so-alert-gap);
14
+ padding: var(--so-alert-padding);
15
+ min-inline-size: 0;
16
+ overflow-wrap: anywhere;
17
+ }
18
+
19
+ .so-alert:has(> .so-alert__icon:not(:empty)) {
20
+ grid-template-columns: auto minmax(0, 1fr);
21
+ }
22
+
23
+ .so-alert[data-closable='true'] {
24
+ grid-template-columns: minmax(0, 1fr) auto;
25
+ }
26
+ .so-alert[data-closable='true']:has(> .so-alert__icon:not(:empty)) {
27
+ grid-template-columns: auto minmax(0, 1fr) auto;
28
+ }
29
+
30
+ .so-alert__icon {
31
+ grid-column: 1;
32
+ grid-row: 1;
33
+ display: inline-flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ /* Match the first text line, including inherited and size-specific leading. */
37
+ margin-block: calc((1lh - var(--so-alert-icon-size)) / 2);
38
+ inline-size: var(--so-alert-icon-size);
39
+ block-size: var(--so-alert-icon-size);
40
+ }
41
+
42
+ .so-alert__icon > .so-icon {
43
+ inline-size: 100%;
44
+ block-size: 100%;
45
+ }
46
+
47
+ .so-alert__body,
48
+ .so-alert__action {
49
+ grid-column: 1;
50
+ min-inline-size: 0;
51
+ }
52
+
53
+ .so-alert:has(> .so-alert__icon:not(:empty)) > .so-alert__body,
54
+ .so-alert:has(> .so-alert__icon:not(:empty)) > .so-alert__action {
55
+ grid-column: 2;
56
+ }
57
+
58
+ .so-alert__body {
59
+ grid-row: 1;
60
+ }
61
+ .so-alert__action {
62
+ display: flex;
63
+ flex-wrap: wrap;
64
+ align-items: center;
65
+ gap: calc(var(--so-alert-gap) / 2);
66
+ grid-row: 2;
67
+ margin-block-start: var(--so-alert-gap);
68
+ }
69
+ .so-alert__title:not(:empty) + .so-alert__content:not(:empty) {
70
+ margin-block-start: calc(var(--so-alert-gap) / 2);
71
+ }
72
+
73
+ .so-alert__icon:empty,
74
+ .so-alert__title:empty,
75
+ .so-alert__content:empty,
76
+ .so-alert__action:empty {
77
+ display: none;
78
+ }
79
+
80
+ .so-alert__close {
81
+ grid-column: -2 / -1;
82
+ grid-row: 1;
83
+ inline-size: var(--so-alert-close-size);
84
+ block-size: var(--so-alert-close-size);
85
+ min-inline-size: var(--so-target-size);
86
+ min-block-size: var(--so-target-size);
87
+ padding: 0;
88
+ font-size: inherit;
89
+ line-height: inherit;
90
+ margin-block: calc((1lh - max(var(--so-alert-close-size), var(--so-target-size))) / 2);
91
+ }
92
+
93
+ /* The close slot has a wrapper, so Button's block auto margins cannot center its icon. */
94
+ .so-alert__close > .so-button__text,
95
+ .so-alert__close > .so-button__text > span {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ }
100
+
101
+ .so-alert--size-sm {
102
+ font-size: var(--so-button-font-size-sm);
103
+ line-height: var(--so-button-line-height-sm);
104
+ }
105
+ .so-alert--size-lg {
106
+ font-size: var(--so-button-font-size-lg);
107
+ line-height: var(--so-button-line-height-lg);
108
+ }
109
+ .so-alert--size-xl {
110
+ font-size: var(--so-button-font-size-xl);
111
+ line-height: var(--so-button-line-height-xl);
112
+ }
113
+ .so-alert--size-2xl {
114
+ font-size: var(--so-button-font-size-2xl);
115
+ line-height: var(--so-button-line-height-2xl);
116
+ }
@@ -0,0 +1,36 @@
1
+ :root {
2
+ --so-avatar-group-overlap: 0.25rem;
3
+ --so-avatar-group-count-padding: 0.375rem;
4
+ }
5
+
6
+ .so-avatar-group {
7
+ display: inline-flex;
8
+ align-items: center;
9
+ vertical-align: middle;
10
+ }
11
+
12
+ /* Logical margins follow the nearest writing direction, including nested LTR/RTL. */
13
+ .so-avatar-group > .so-avatar ~ .so-avatar,
14
+ .so-avatar-group > .so-avatar ~ .so-avatar-group__overflow {
15
+ margin-inline-start: calc(-1 * var(--so-avatar-group-overlap));
16
+ }
17
+
18
+ .so-avatar-group__overflow {
19
+ position: relative;
20
+ display: inline-flex;
21
+ flex: none;
22
+ }
23
+
24
+ .so-avatar-group__count {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ min-inline-size: var(--so-avatar-size-normal);
29
+ block-size: var(--so-avatar-size-normal);
30
+ padding-inline: var(--so-avatar-group-count-padding);
31
+ font-size: var(--so-avatar-font-size-normal);
32
+ line-height: 1;
33
+ white-space: nowrap;
34
+ direction: ltr;
35
+ unicode-bidi: isolate;
36
+ }
@@ -0,0 +1,75 @@
1
+ /* Each avatar owns its size; groups never replace a child's scale. */
2
+ :root {
3
+ --so-avatar-size-sm: 1.5rem;
4
+ --so-avatar-size-normal: 2rem;
5
+ --so-avatar-size-lg: 2.5rem;
6
+ --so-avatar-size-xl: 3rem;
7
+ --so-avatar-size-2xl: 4rem;
8
+
9
+ --so-avatar-font-size-sm: calc(1em - 0.125rem);
10
+ --so-avatar-font-size-normal: 1em;
11
+ --so-avatar-font-size-lg: calc(1em + 0.125rem);
12
+ --so-avatar-font-size-xl: calc(1em + 0.25rem);
13
+ --so-avatar-font-size-2xl: calc(1em + 0.5rem);
14
+ }
15
+
16
+ .so-avatar {
17
+ --so-avatar-size: var(--so-avatar-size-normal);
18
+ --so-avatar-font-size: var(--so-avatar-font-size-normal);
19
+
20
+ position: relative;
21
+ display: inline-grid;
22
+ flex: none;
23
+ inline-size: var(--so-avatar-size);
24
+ block-size: var(--so-avatar-size);
25
+ overflow: hidden;
26
+ vertical-align: middle;
27
+ }
28
+
29
+ .so-avatar--size-sm {
30
+ --so-avatar-size: var(--so-avatar-size-sm);
31
+ --so-avatar-font-size: var(--so-avatar-font-size-sm);
32
+ }
33
+
34
+ .so-avatar--size-lg {
35
+ --so-avatar-size: var(--so-avatar-size-lg);
36
+ --so-avatar-font-size: var(--so-avatar-font-size-lg);
37
+ }
38
+
39
+ .so-avatar--size-xl {
40
+ --so-avatar-size: var(--so-avatar-size-xl);
41
+ --so-avatar-font-size: var(--so-avatar-font-size-xl);
42
+ }
43
+
44
+ .so-avatar--size-2xl {
45
+ --so-avatar-size: var(--so-avatar-size-2xl);
46
+ --so-avatar-font-size: var(--so-avatar-font-size-2xl);
47
+ }
48
+
49
+ .so-avatar__image,
50
+ .so-avatar__fallback {
51
+ grid-area: 1 / 1;
52
+ inline-size: 100%;
53
+ block-size: 100%;
54
+ min-inline-size: 0;
55
+ }
56
+
57
+ .so-avatar__image {
58
+ display: block;
59
+ object-fit: cover;
60
+ }
61
+
62
+ .so-avatar__fallback {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ font-size: var(--so-avatar-font-size);
67
+ line-height: 1;
68
+ white-space: nowrap;
69
+ }
70
+
71
+ /* Keep the fallback for idle, loading and error; an unfinished image is never visible. */
72
+ .so-avatar:not([data-status='loaded']) > .so-avatar__image,
73
+ .so-avatar[data-status='loaded'] > .so-avatar__fallback {
74
+ display: none;
75
+ }
@@ -0,0 +1,106 @@
1
+ /* Size scales are document defaults; each Badge selects its own size below. */
2
+ :root {
3
+ --so-badge-height-sm: 1rem;
4
+ --so-badge-height-normal: 1.25rem;
5
+ --so-badge-height-lg: 1.5rem;
6
+ --so-badge-height-xl: 1.75rem;
7
+ --so-badge-height-2xl: 2rem;
8
+
9
+ --so-badge-font-size-sm: 0.625rem;
10
+ --so-badge-font-size-normal: 0.75rem;
11
+ --so-badge-font-size-lg: 0.875rem;
12
+ --so-badge-font-size-xl: 1rem;
13
+ --so-badge-font-size-2xl: 1.125rem;
14
+
15
+ --so-badge-padding-sm: 0.25rem;
16
+ --so-badge-padding-normal: 0.375rem;
17
+ --so-badge-padding-lg: 0.4375rem;
18
+ --so-badge-padding-xl: 0.5rem;
19
+ --so-badge-padding-2xl: 0.625rem;
20
+
21
+ --so-badge-dot-size-sm: 0.375rem;
22
+ --so-badge-dot-size-normal: 0.5rem;
23
+ --so-badge-dot-size-lg: 0.625rem;
24
+ --so-badge-dot-size-xl: 0.75rem;
25
+ --so-badge-dot-size-2xl: 0.875rem;
26
+ }
27
+
28
+ /* Inline geometry and logical overlay placement; appearance belongs to a theme. */
29
+ .so-badge {
30
+ --so-badge-height: var(--so-badge-height-normal);
31
+ --so-badge-font-size: var(--so-badge-font-size-normal);
32
+ --so-badge-padding: var(--so-badge-padding-normal);
33
+ --so-badge-dot-size: var(--so-badge-dot-size-normal);
34
+
35
+ position: relative;
36
+ display: inline-flex;
37
+ vertical-align: middle;
38
+ }
39
+
40
+ .so-badge--size-sm {
41
+ --so-badge-height: var(--so-badge-height-sm);
42
+ --so-badge-font-size: var(--so-badge-font-size-sm);
43
+ --so-badge-padding: var(--so-badge-padding-sm);
44
+ --so-badge-dot-size: var(--so-badge-dot-size-sm);
45
+ }
46
+
47
+ .so-badge--size-lg {
48
+ --so-badge-height: var(--so-badge-height-lg);
49
+ --so-badge-font-size: var(--so-badge-font-size-lg);
50
+ --so-badge-padding: var(--so-badge-padding-lg);
51
+ --so-badge-dot-size: var(--so-badge-dot-size-lg);
52
+ }
53
+
54
+ .so-badge--size-xl {
55
+ --so-badge-height: var(--so-badge-height-xl);
56
+ --so-badge-font-size: var(--so-badge-font-size-xl);
57
+ --so-badge-padding: var(--so-badge-padding-xl);
58
+ --so-badge-dot-size: var(--so-badge-dot-size-xl);
59
+ }
60
+
61
+ .so-badge--size-2xl {
62
+ --so-badge-height: var(--so-badge-height-2xl);
63
+ --so-badge-font-size: var(--so-badge-font-size-2xl);
64
+ --so-badge-padding: var(--so-badge-padding-2xl);
65
+ --so-badge-dot-size: var(--so-badge-dot-size-2xl);
66
+ }
67
+
68
+ .so-badge__anchor {
69
+ display: inline-flex;
70
+ }
71
+
72
+ .so-badge__anchor:empty {
73
+ display: none;
74
+ }
75
+
76
+ .so-badge__indicator {
77
+ display: inline-flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ flex-shrink: 0;
81
+
82
+ min-inline-size: var(--so-badge-height);
83
+ block-size: var(--so-badge-height);
84
+ padding-inline: var(--so-badge-padding);
85
+
86
+ font-size: var(--so-badge-font-size);
87
+ line-height: 1;
88
+ white-space: nowrap;
89
+
90
+ pointer-events: none;
91
+ }
92
+
93
+ .so-badge[data-dot='true'] > .so-badge__indicator {
94
+ inline-size: var(--so-badge-dot-size);
95
+ min-inline-size: var(--so-badge-dot-size);
96
+ block-size: var(--so-badge-dot-size);
97
+ padding: 0;
98
+ border-radius: 50%;
99
+ }
100
+
101
+ .so-badge:has(> .so-badge__anchor:not(:empty)) > .so-badge__indicator {
102
+ position: absolute;
103
+ inset-block-start: 0;
104
+ inset-inline-end: 0;
105
+ translate: calc(50% * var(--so-dir-sign)) -50%;
106
+ }
@@ -0,0 +1,103 @@
1
+ /* Breadcrumbs is a wrapping navigation row. Each collection item keeps its li
2
+ * while collapsed ancestors are represented by Menu items at the overflow stop.
3
+ * The first visible li hosts that stop immediately after its own native anchor.
4
+ *
5
+ * Root variables expose the gap scale and separator geometry to themes. Gap
6
+ * defaults follow Button's shared scale; a theme can override Breadcrumbs alone.
7
+ * Each size resolves its step into --so-breadcrumbs-gap for the list and items.
8
+ * Text uses ItemRow's font scale; appearance and separator content belong to the theme. */
9
+
10
+ :root {
11
+ --so-breadcrumbs-gap-sm: var(--so-button-gap-sm);
12
+ --so-breadcrumbs-gap-normal: var(--so-button-gap-normal);
13
+ --so-breadcrumbs-gap-lg: var(--so-button-gap-lg);
14
+ --so-breadcrumbs-gap-xl: var(--so-button-gap-xl);
15
+ --so-breadcrumbs-gap-2xl: var(--so-button-gap-2xl);
16
+
17
+ --so-breadcrumbs-separator-size: 0.5em;
18
+ }
19
+
20
+ /* Resolve the normal step locally so ancestor overrides of the scale are inherited. */
21
+ .so-breadcrumbs,
22
+ .so-breadcrumbs-item {
23
+ --so-breadcrumbs-gap: var(--so-breadcrumbs-gap-normal);
24
+ min-inline-size: 0;
25
+ }
26
+
27
+ .so-breadcrumbs__list {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ align-items: center;
31
+ gap: var(--so-breadcrumbs-gap);
32
+ margin: 0;
33
+ padding: 0;
34
+ list-style: none;
35
+ }
36
+
37
+ .so-breadcrumbs-item {
38
+ display: inline-flex;
39
+ align-items: center;
40
+ gap: var(--so-breadcrumbs-gap);
41
+ max-inline-size: 100%;
42
+ }
43
+
44
+ /* The link keeps ItemRow's slots and font, with inline navigation geometry. */
45
+ .so-breadcrumbs__link {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ gap: var(--so-breadcrumbs-gap);
49
+ min-inline-size: 0;
50
+ height: auto;
51
+ padding-inline: 0;
52
+ cursor: default;
53
+ overflow-wrap: anywhere;
54
+ }
55
+
56
+ .so-breadcrumbs__link[href] {
57
+ cursor: pointer;
58
+ }
59
+
60
+ /* Long labels wrap with the trail instead of inheriting Button's ellipsis. */
61
+ .so-breadcrumbs__link > .so-button__text {
62
+ white-space: normal;
63
+ overflow: visible;
64
+ text-overflow: clip;
65
+ text-align: start;
66
+ }
67
+
68
+ .so-breadcrumbs__separator {
69
+ display: inline-flex;
70
+ flex: none;
71
+ justify-content: center;
72
+ inline-size: var(--so-breadcrumbs-separator-size);
73
+ user-select: none;
74
+ }
75
+
76
+ .so-breadcrumbs--size-sm,
77
+ .so-breadcrumbs-item--size-sm {
78
+ --so-breadcrumbs-gap: var(--so-breadcrumbs-gap-sm);
79
+ }
80
+
81
+ .so-breadcrumbs--size-lg,
82
+ .so-breadcrumbs-item--size-lg {
83
+ --so-breadcrumbs-gap: var(--so-breadcrumbs-gap-lg);
84
+ }
85
+
86
+ .so-breadcrumbs--size-xl,
87
+ .so-breadcrumbs-item--size-xl {
88
+ --so-breadcrumbs-gap: var(--so-breadcrumbs-gap-xl);
89
+ }
90
+
91
+ .so-breadcrumbs--size-2xl,
92
+ .so-breadcrumbs-item--size-2xl {
93
+ --so-breadcrumbs-gap: var(--so-breadcrumbs-gap-2xl);
94
+ }
95
+
96
+ /* Fade the source item once; embedded controls inherit the reset opacity. */
97
+ .so-breadcrumbs-item[data-disabled='true'] {
98
+ opacity: var(--so-disabled-opacity);
99
+ }
100
+
101
+ .so-breadcrumbs-item[data-disabled='true'] > * {
102
+ --so-disabled-opacity: 1;
103
+ }
@@ -0,0 +1,173 @@
1
+ /* Geometry is shared by all themes; every configurable dimension has a public default. */
2
+ :root {
3
+ --so-code-block-padding: 1em;
4
+ --so-code-block-gap: 0.5em;
5
+ --so-code-block-font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
6
+ --so-code-block-font-size: 0.8125em;
7
+ --so-code-block-toolbar-font-size: 0.75rem;
8
+ --so-code-block-line-height: 1.6;
9
+ --so-code-block-tab-size: 4;
10
+ --so-code-block-header-height-sm: 2.25rem;
11
+ --so-code-block-header-height-normal: 2.5rem;
12
+ --so-code-block-header-height-lg: 2.75rem;
13
+ --so-code-block-header-height-xl: 3rem;
14
+ --so-code-block-header-height-2xl: 3.25rem;
15
+ --so-code-block-gutter-width: 2ch;
16
+ }
17
+ .so-code-block {
18
+ --so-code-block-header-height: var(--so-code-block-header-height-normal);
19
+ position: relative;
20
+ display: block;
21
+ min-inline-size: 0;
22
+ max-inline-size: 100%;
23
+ }
24
+ .so-code-block__header {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: var(--so-code-block-gap);
28
+ min-block-size: var(--so-code-block-header-height);
29
+ padding-inline: var(--so-code-block-padding);
30
+ }
31
+ .so-code-block__title {
32
+ flex: 1;
33
+ min-inline-size: 0;
34
+ overflow: hidden;
35
+ text-overflow: ellipsis;
36
+ white-space: nowrap;
37
+ font-family: var(--so-code-block-font-family);
38
+ font-size: var(--so-code-block-toolbar-font-size);
39
+ }
40
+ .so-code-block__tabs {
41
+ min-inline-size: 0;
42
+ }
43
+ .so-code-block__tabs > .so-tabs__bar > .so-tabs__list {
44
+ flex-wrap: nowrap;
45
+ overflow-x: auto;
46
+ }
47
+ .so-code-block__content {
48
+ position: relative;
49
+ min-inline-size: 0;
50
+ }
51
+ .so-code-block__pre {
52
+ margin: 0;
53
+ padding: var(--so-code-block-padding);
54
+ overflow: auto;
55
+ max-inline-size: 100%;
56
+ font-family: var(--so-code-block-font-family);
57
+ font-size: var(--so-code-block-font-size);
58
+ line-height: var(--so-code-block-line-height);
59
+ tab-size: var(--so-code-block-tab-size);
60
+ white-space: pre;
61
+ text-align: left;
62
+ }
63
+ /* A separate row keeps arbitrary copy content outside the code scrollport. */
64
+ .so-code-block[data-header='false'][data-copyable='true'] > .so-code-block__content {
65
+ display: grid;
66
+ grid-template-columns: minmax(0, 1fr);
67
+ }
68
+ .so-code-block[data-header='false'][data-copyable='true']
69
+ > .so-code-block__content
70
+ > .so-code-block__pre {
71
+ grid-row: 2;
72
+ min-inline-size: 0;
73
+ }
74
+ .so-code-block__code {
75
+ display: block;
76
+ min-inline-size: max-content;
77
+ font: inherit;
78
+ }
79
+ .so-code-block__line {
80
+ display: flex;
81
+ min-block-size: 1lh;
82
+ }
83
+ .so-code-block__text {
84
+ min-inline-size: 0;
85
+ }
86
+ .so-code-block__gutter {
87
+ flex: none;
88
+ inline-size: var(--so-code-block-gutter-width);
89
+ padding-inline-end: var(--so-code-block-gap);
90
+ text-align: right;
91
+ user-select: none;
92
+ }
93
+ .so-code-block[data-wrap='true'] > .so-code-block__content > .so-code-block__pre,
94
+ .so-code-block[data-wrap='true']
95
+ > .so-code-block__tabs
96
+ > .so-code-block__content
97
+ > .so-code-block__pre {
98
+ white-space: pre-wrap;
99
+ overflow-wrap: anywhere;
100
+ }
101
+ .so-code-block[data-wrap='true']
102
+ > .so-code-block__content
103
+ > .so-code-block__pre
104
+ > .so-code-block__code,
105
+ .so-code-block[data-wrap='true']
106
+ > .so-code-block__tabs
107
+ > .so-code-block__content
108
+ > .so-code-block__pre
109
+ > .so-code-block__code {
110
+ min-inline-size: 0;
111
+ }
112
+ .so-code-block__copy {
113
+ flex: none;
114
+ font-size: var(--so-code-block-toolbar-font-size);
115
+ min-block-size: calc(var(--so-code-block-header-height) - 2 * var(--so-code-block-gap));
116
+ block-size: auto;
117
+ padding-block: 0;
118
+ padding-inline: var(--so-code-block-gap);
119
+ line-height: var(--so-code-block-line-height);
120
+ }
121
+ .so-code-block[data-header='false'] > .so-code-block__content > .so-code-block__copy {
122
+ grid-row: 1;
123
+ justify-self: end;
124
+ max-inline-size: calc(100% - 2 * var(--so-code-block-gap));
125
+ margin-block-start: var(--so-code-block-gap);
126
+ margin-inline: var(--so-code-block-gap);
127
+ }
128
+ .so-code-block__status {
129
+ display: block;
130
+ padding-inline: var(--so-code-block-padding);
131
+ }
132
+
133
+ .so-code-block__status:empty {
134
+ display: none;
135
+ }
136
+ /* Embedded Tabs shares one compact toolbar with its copy action. */
137
+ .so-code-block__tabs > .so-tabs__bar {
138
+ min-block-size: var(--so-code-block-header-height);
139
+ padding-inline: var(--so-code-block-padding);
140
+ gap: var(--so-code-block-gap);
141
+ overflow: visible;
142
+ }
143
+ .so-code-block__tabs > .so-tabs__bar > .so-tabs__list {
144
+ gap: 0;
145
+ }
146
+ .so-code-block__tabs > .so-tabs__bar > .so-tabs__list > .so-tabs-item > .so-button {
147
+ font-size: var(--so-code-block-toolbar-font-size);
148
+ min-block-size: var(--so-code-block-header-height);
149
+ block-size: auto;
150
+ padding-block: 0;
151
+ padding-inline: var(--so-code-block-gap);
152
+ }
153
+ .so-code-block__tabs > .so-tabs__bar > .so-tabs__trailing {
154
+ flex: none;
155
+ max-inline-size: 50%;
156
+ gap: var(--so-code-block-gap);
157
+ padding-inline: 0;
158
+ }
159
+ .so-code-block__tabs > .so-tabs-content {
160
+ margin-block: 0;
161
+ }
162
+ .so-code-block--size-sm {
163
+ --so-code-block-header-height: var(--so-code-block-header-height-sm);
164
+ }
165
+ .so-code-block--size-lg {
166
+ --so-code-block-header-height: var(--so-code-block-header-height-lg);
167
+ }
168
+ .so-code-block--size-xl {
169
+ --so-code-block-header-height: var(--so-code-block-header-height-xl);
170
+ }
171
+ .so-code-block--size-2xl {
172
+ --so-code-block-header-height: var(--so-code-block-header-height-2xl);
173
+ }
@@ -86,7 +86,9 @@
86
86
  width: 100%;
87
87
  }
88
88
 
89
+ /* Select-only keeps keyboard focus on the input without a text caret. */
89
90
  .so-select__field input:read-only {
91
+ caret-color: transparent;
90
92
  cursor: default;
91
93
  -webkit-user-select: none;
92
94
  user-select: none;
@@ -0,0 +1,15 @@
1
+ /* The parent supplies the available length; the line never consumes flex space. */
2
+ .so-separator {
3
+ flex: none;
4
+ align-self: stretch;
5
+ }
6
+
7
+ .so-separator--orientation-horizontal {
8
+ inline-size: 100%;
9
+ block-size: var(--so-separator-width, 1px);
10
+ }
11
+
12
+ .so-separator--orientation-vertical {
13
+ inline-size: var(--so-separator-width, 1px);
14
+ block-size: 100%;
15
+ }