@diplodoc/transform 4.59.1 → 4.60.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": "@diplodoc/transform",
3
- "version": "4.59.1",
3
+ "version": "4.60.0",
4
4
  "description": "A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML",
5
5
  "keywords": [
6
6
  "markdown",
@@ -122,10 +122,6 @@
122
122
  height: auto;
123
123
  }
124
124
 
125
- .katex svg {
126
- height: initial;
127
- }
128
-
129
125
  img + small {
130
126
  display: block;
131
127
  }
@@ -0,0 +1,6 @@
1
+ .yfm {
2
+ .katex svg {
3
+ height: inherit;
4
+ max-height: inherit;
5
+ }
6
+ }
@@ -30,32 +30,47 @@
30
30
  }
31
31
  }
32
32
 
33
+ @mixin yfm-sticky-header-row {
34
+ position: sticky;
35
+ top: 0;
36
+ z-index: 2;
37
+
38
+ td,
39
+ th {
40
+ position: relative;
41
+ z-index: 0;
42
+ }
43
+
44
+ td::before,
45
+ th::before {
46
+ content: '';
47
+ background: var(--yfm-color-base);
48
+ position: absolute;
49
+ inset: 0;
50
+ z-index: -2;
51
+ }
52
+
53
+ td::after,
54
+ th::after {
55
+ content: '';
56
+ background: var(--yfm-color-table-row-background);
57
+ position: absolute;
58
+ inset: 0;
59
+ z-index: -1;
60
+ }
61
+ }
62
+
33
63
  .yfm table[sticky-header] {
34
64
  position: relative;
35
65
 
36
66
  thead {
37
- position: sticky;
38
- top: 0;
39
-
40
- & th {
41
- position: relative;
42
- z-index: 0;
43
- }
44
-
45
- & th::before {
46
- content: '';
47
- background: var(--yfm-color-base);
48
- position: absolute;
49
- inset: 0;
50
- z-index: -2;
51
- }
67
+ @include yfm-sticky-header-row;
68
+ }
52
69
 
53
- & th::after {
54
- content: '';
55
- background: var(--yfm-color-table-row-background);
56
- position: absolute;
57
- inset: 0;
58
- z-index: -1;
70
+ &:not(:has(thead)) {
71
+ tbody > tr:first-child,
72
+ > tr:first-child {
73
+ @include yfm-sticky-header-row;
59
74
  }
60
75
  }
61
76
 
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  Note: This file excludes "cut", "file" and "tabs" as they are handled separately
3
- in dedicated extensions (packages). In the future, "note", "term"
3
+ in dedicated extensions (packages). In the future, "note", "term", "katex"
4
4
  and "table" will also be excluded from this file and moved to yfm.scss,
5
5
  once they are moved to separate packages. Direct usage is not recommended,
6
6
  as the file is subject to changes without prior notice.
7
7
  */
8
8
 
9
9
  @import 'note';
10
+ @import 'katex';
10
11
  @import 'table';
11
12
  @import 'term';
12
13
  @import 'inline-code';