@webority/theme 0.83.4 → 0.84.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": "@webority/theme",
3
- "version": "0.83.4",
3
+ "version": "0.84.0",
4
4
  "description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -55,6 +55,7 @@
55
55
  @import "wui/chart-card";
56
56
  @import "wui/calendar";
57
57
  @import "wui/rich-text";
58
+ @import "wui/markdown";
58
59
  @import "wui/scrollbar";
59
60
  @import "wui/sortable";
60
61
  // Before `split-view`, which places the legend sheet inside the list column.
@@ -44,6 +44,7 @@
44
44
  @import "wui/sections";
45
45
  @import "wui/chart";
46
46
  @import "wui/chart-card";
47
+ @import "wui/markdown";
47
48
  @import "wui/scrollbar";
48
49
  @import "wui/sortable";
49
50
  // Before `split-view`, which places the legend sheet inside the list column.
@@ -0,0 +1,77 @@
1
+ // Markdown: the <wui-markdown class="wui-markdown"> element that draws a brief, a comment or a work-item
2
+ // text. The root is the element, not a div: Razor <app-markdown> writes it, and the element draws the
3
+ // blocks inside it.
4
+ //
5
+ // Part of the wui-components layer; see _wui-components.scss for load order. The root takes the body
6
+ // size, and its blocks take the same prose sizes the rich-text editor shows, so a comment reads the
7
+ // same in both. Every colour is a token the dark remap flips with the rest of the portal. Links and
8
+ // code blocks style themselves (AppLink and AppCodeBlock), so this file leaves them alone.
9
+
10
+ .wui-markdown {
11
+ display: block;
12
+ min-width: 0;
13
+ color: var(--color-text);
14
+ font-size: 14px;
15
+ line-height: 1.5;
16
+ overflow-wrap: anywhere;
17
+ }
18
+ // The element's source comes first and stays hidden once the blocks are drawn, so the first block
19
+ // is the one after it.
20
+ .wui-markdown > :first-child,
21
+ .wui-markdown > [hidden] + * {
22
+ margin-top: 0;
23
+ }
24
+ .wui-markdown > :last-child {
25
+ margin-bottom: 0;
26
+ }
27
+ // The source is the no-script fallback, so it is hidden only once the element has drawn the blocks.
28
+ .wui-markdown-source[hidden] {
29
+ display: none;
30
+ }
31
+ .wui-markdown p {
32
+ margin: 0 0 0.75em;
33
+ }
34
+ .wui-markdown h2 {
35
+ margin: 1em 0 0.5em;
36
+ color: var(--color-text);
37
+ font-size: 1.25em;
38
+ font-weight: 600;
39
+ line-height: 1.3;
40
+ }
41
+ .wui-markdown ul,
42
+ .wui-markdown ol {
43
+ margin: 0 0 0.75em;
44
+ padding-left: 1.5em;
45
+ }
46
+ // Inline code only: a code block's own <code> sits inside its <pre> and keeps its block styling.
47
+ .wui-markdown :not(pre) > code {
48
+ padding: 0.1em 0.35em;
49
+ border-radius: var(--wui-radius-sm);
50
+ background: var(--color-bg-muted);
51
+ font-size: 0.9em;
52
+ }
53
+ .wui-markdown .wui-code-block {
54
+ margin: 0 0 0.75em;
55
+ }
56
+ .wui-markdown hr {
57
+ margin: 1em 0;
58
+ border: 0;
59
+ border-top: 1px solid var(--color-border);
60
+ }
61
+ // Bootstrap's table reads its cell padding, border and colour from these variables, so the scoped
62
+ // values win on the same element without fighting its cell rules.
63
+ .wui-markdown .table {
64
+ --bs-table-bg: transparent;
65
+ --bs-table-color: var(--color-text);
66
+ --bs-table-border-color: var(--color-border);
67
+ --bs-table-padding-x: 10px;
68
+ --bs-table-padding-y: 6px;
69
+ margin: 0;
70
+ font-size: 13px;
71
+ }
72
+ .wui-markdown .table-responsive {
73
+ margin: 0 0 0.75em;
74
+ }
75
+ .wui-markdown .table th {
76
+ font-weight: 600;
77
+ }