@diplodoc/transform 4.61.0 → 4.62.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.61.0",
3
+ "version": "4.62.0",
4
4
  "description": "A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML",
5
5
  "keywords": [
6
6
  "markdown",
@@ -25,12 +25,10 @@
25
25
  color: var(--yfm-color-text);
26
26
  tab-size: var(--yfm-tab-size, inherit);
27
27
 
28
- --yfm-font-family-monospace:
29
- 'Menlo', 'Monaco', 'Consolas', 'Ubuntu Mono', 'Liberation Mono', 'DejaVu Sans Mono',
30
- 'Courier New', 'Courier', monospace;
31
- --yfm-font-family-sans:
32
- 'Segoe UI', arial, helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
33
- 'Segoe UI Symbol';
28
+ --yfm-font-family-monospace: 'Menlo', 'Monaco', 'Consolas', 'Ubuntu Mono', 'Liberation Mono',
29
+ 'DejaVu Sans Mono', 'Courier New', 'Courier', monospace;
30
+ --yfm-font-family-sans: 'Segoe UI', arial, helvetica, sans-serif, 'Apple Color Emoji',
31
+ 'Segoe UI Emoji', 'Segoe UI Symbol';
34
32
 
35
33
  * {
36
34
  box-sizing: border-box;
@@ -192,15 +190,14 @@
192
190
  z-index: 1;
193
191
 
194
192
  box-sizing: border-box;
195
- border: 1px solid var(--yfm-color-border);
193
+ border: 1px solid var(--yfm-color-table-border);
196
194
  border-radius: 8px;
197
195
  border-collapse: collapse;
198
196
  border-spacing: 0;
199
- background: var(--yfm-color-base);
197
+ background: var(--yfm-color-table-background);
200
198
 
201
- thead,
202
- tr:nth-child(2n) {
203
- background-color: var(--yfm-color-table-row-background);
199
+ thead {
200
+ background-color: var(--yfm-color-table-head-background);
204
201
  }
205
202
 
206
203
  tr:first-child {
@@ -222,7 +219,7 @@
222
219
  padding: 10px 20px;
223
220
  overflow: hidden;
224
221
  text-overflow: ellipsis;
225
- border: 1px solid var(--yfm-color-border);
222
+ border: 1px solid var(--yfm-color-table-border);
226
223
 
227
224
  @include removeMarginForEdgeChildren();
228
225
  }
@@ -247,6 +244,10 @@
247
244
  }
248
245
  }
249
246
 
247
+ &:not(.yfm_no-stripe-table) table tr:nth-child(2n) {
248
+ background-color: var(--yfm-color-table-stripe-row-background);
249
+ }
250
+
250
251
  hr {
251
252
  box-sizing: content-box;
252
253
  height: 0.25em;
@@ -286,7 +287,6 @@
286
287
  margin-bottom: 5px;
287
288
  font-size: 1em;
288
289
  font-weight: 500;
289
- font-style: italic;
290
290
  }
291
291
 
292
292
  dd {
@@ -44,7 +44,7 @@
44
44
  td::before,
45
45
  th::before {
46
46
  content: '';
47
- background: var(--yfm-color-base);
47
+ background: var(--yfm-color-table-background);
48
48
  position: absolute;
49
49
  inset: 0;
50
50
  z-index: -2;
@@ -53,7 +53,7 @@
53
53
  td::after,
54
54
  th::after {
55
55
  content: '';
56
- background: var(--yfm-color-table-row-background);
56
+ background: var(--yfm-color-table-head-background);
57
57
  position: absolute;
58
58
  inset: 0;
59
59
  z-index: -1;
@@ -5,10 +5,6 @@
5
5
  --yfm-color-link: var(--yfm-color-link-private);
6
6
  --yfm-color-link-hover: var(--yfm-color-link-hover-private);
7
7
 
8
- --yfm-color-table: var(--yfm-color-table-private);
9
- --yfm-color-table-row-background: var(--yfm-color-table-row-background-private);
10
- --yfm-color-table-row-header-background: var(--yfm-color-table-row-header-background-private);
11
-
12
8
  --yfm-color-border: var(--yfm-color-border-private);
13
9
 
14
10
  --yfm-color-accent: var(--yfm-color-accent-private);
@@ -48,4 +44,13 @@
48
44
  --yfm-color-modal-actions-hover: var(--yfm-color-modal-actions-hover-private);
49
45
  --yfm-color-modal-wide-content: var(--yfm-color-modal-wide-content-private);
50
46
  --yfm-color-modal-wide-content-overlay: var(--yfm-color-modal-wide-content-overlay-private);
47
+
48
+ // table
49
+ --yfm-color-table: var(--yfm-color-table-private);
50
+ --yfm-color-table-border: var(--yfm-color-border);
51
+ --yfm-color-table-background: var(--yfm-color-base);
52
+ --yfm-color-table-head-background: var(--yfm-color-table-row-background);
53
+ --yfm-color-table-stripe-row-background: var(--yfm-color-table-row-background);
54
+ // TODO: next var is deprecated, need to remove later
55
+ --yfm-color-table-row-background: var(--yfm-color-table-row-background-private);
51
56
  }
@@ -6,7 +6,6 @@
6
6
  --yfm-color-table-private: #333;
7
7
  --yfm-color-border-private: rgba(0, 0, 0, 0.07);
8
8
  --yfm-color-table-row-background-private: rgba(0, 0, 0, 0.02);
9
- --yfm-color-table-row-header-background-private: rgba(247, 247, 247, 1);
10
9
  --yfm-color-accent-private: #027bf3;
11
10
 
12
11
  --yfm-color-inline-code-private: rgba(59, 96, 128, 1);