@diplodoc/transform 4.61.1 → 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.1",
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",
@@ -190,15 +190,14 @@
190
190
  z-index: 1;
191
191
 
192
192
  box-sizing: border-box;
193
- border: 1px solid var(--yfm-color-border);
193
+ border: 1px solid var(--yfm-color-table-border);
194
194
  border-radius: 8px;
195
195
  border-collapse: collapse;
196
196
  border-spacing: 0;
197
- background: var(--yfm-color-base);
197
+ background: var(--yfm-color-table-background);
198
198
 
199
- thead,
200
- tr:nth-child(2n) {
201
- background-color: var(--yfm-color-table-row-background);
199
+ thead {
200
+ background-color: var(--yfm-color-table-head-background);
202
201
  }
203
202
 
204
203
  tr:first-child {
@@ -220,7 +219,7 @@
220
219
  padding: 10px 20px;
221
220
  overflow: hidden;
222
221
  text-overflow: ellipsis;
223
- border: 1px solid var(--yfm-color-border);
222
+ border: 1px solid var(--yfm-color-table-border);
224
223
 
225
224
  @include removeMarginForEdgeChildren();
226
225
  }
@@ -245,6 +244,10 @@
245
244
  }
246
245
  }
247
246
 
247
+ &:not(.yfm_no-stripe-table) table tr:nth-child(2n) {
248
+ background-color: var(--yfm-color-table-stripe-row-background);
249
+ }
250
+
248
251
  hr {
249
252
  box-sizing: content-box;
250
253
  height: 0.25em;
@@ -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);