@diplodoc/transform 4.78.2 → 4.78.3

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.
@@ -19,6 +19,10 @@
19
19
  transition:
20
20
  opacity 0.1s ease-out,
21
21
  color 0.15s linear;
22
+
23
+ &::before {
24
+ opacity: 0.5;
25
+ }
22
26
  }
23
27
 
24
28
  &:hover {
@@ -56,6 +60,23 @@
56
60
  flex-wrap: nowrap;
57
61
  gap: 4px;
58
62
 
63
+ &::before {
64
+ $background: var(
65
+ --yfm-color-code-background,
66
+ var(--yfm-color-code-background-private)
67
+ );
68
+
69
+ content: '';
70
+ position: absolute;
71
+ inset: 0;
72
+ z-index: -1;
73
+ background:
74
+ linear-gradient($background, $background),
75
+ var(--yfm-color-base, var(--yfm-color-base-private));
76
+ opacity: 0.5;
77
+ pointer-events: none;
78
+ }
79
+
59
80
  &:focus,
60
81
  &:has(> .yfm-code-button:focus) {
61
82
  opacity: 1;
@@ -73,6 +94,20 @@
73
94
  }
74
95
  }
75
96
 
97
+ & &-code-floating-container > pre > code {
98
+ @media screen {
99
+ @supports selector(::-webkit-scrollbar) {
100
+ scrollbar-width: auto;
101
+ scrollbar-color: auto;
102
+
103
+ &:not(.wrap) {
104
+ padding-bottom: 10px;
105
+ overflow-x: scroll;
106
+ }
107
+ }
108
+ }
109
+ }
110
+
76
111
  &-clipboard-inline-code {
77
112
  transition: 0.3s;
78
113
 
@@ -415,6 +415,21 @@
415
415
 
416
416
  white-space: pre;
417
417
 
418
+ @media screen {
419
+ &::-webkit-scrollbar {
420
+ height: 6px;
421
+ }
422
+
423
+ &::-webkit-scrollbar-thumb {
424
+ min-width: 24px;
425
+ border-radius: 3px;
426
+ background-color: var(
427
+ --g-color-scroll-handle,
428
+ var(--yfm-color-text, var(--yfm-color-text-private))
429
+ );
430
+ }
431
+ }
432
+
418
433
  .yfm-line-number {
419
434
  display: inline-block;
420
435
  padding-right: 1em;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/transform",
3
- "version": "4.78.2",
3
+ "version": "4.78.3",
4
4
  "description": "A simple transformer of text in YFM (Yandex Flavored Markdown) to HTML",
5
5
  "keywords": [
6
6
  "markdown",
@@ -19,6 +19,10 @@
19
19
  transition:
20
20
  opacity 0.1s ease-out,
21
21
  color 0.15s linear;
22
+
23
+ &::before {
24
+ opacity: 0.5;
25
+ }
22
26
  }
23
27
 
24
28
  &:hover {
@@ -56,6 +60,23 @@
56
60
  flex-wrap: nowrap;
57
61
  gap: 4px;
58
62
 
63
+ &::before {
64
+ $background: var(
65
+ --yfm-color-code-background,
66
+ var(--yfm-color-code-background-private)
67
+ );
68
+
69
+ content: '';
70
+ position: absolute;
71
+ inset: 0;
72
+ z-index: -1;
73
+ background:
74
+ linear-gradient($background, $background),
75
+ var(--yfm-color-base, var(--yfm-color-base-private));
76
+ opacity: 0.5;
77
+ pointer-events: none;
78
+ }
79
+
59
80
  &:focus,
60
81
  &:has(> .yfm-code-button:focus) {
61
82
  opacity: 1;
@@ -73,6 +94,20 @@
73
94
  }
74
95
  }
75
96
 
97
+ & &-code-floating-container > pre > code {
98
+ @media screen {
99
+ @supports selector(::-webkit-scrollbar) {
100
+ scrollbar-width: auto;
101
+ scrollbar-color: auto;
102
+
103
+ &:not(.wrap) {
104
+ padding-bottom: 10px;
105
+ overflow-x: scroll;
106
+ }
107
+ }
108
+ }
109
+ }
110
+
76
111
  &-clipboard-inline-code {
77
112
  transition: 0.3s;
78
113
 
@@ -415,6 +415,21 @@
415
415
 
416
416
  white-space: pre;
417
417
 
418
+ @media screen {
419
+ &::-webkit-scrollbar {
420
+ height: 6px;
421
+ }
422
+
423
+ &::-webkit-scrollbar-thumb {
424
+ min-width: 24px;
425
+ border-radius: 3px;
426
+ background-color: var(
427
+ --g-color-scroll-handle,
428
+ var(--yfm-color-text, var(--yfm-color-text-private))
429
+ );
430
+ }
431
+ }
432
+
418
433
  .yfm-line-number {
419
434
  display: inline-block;
420
435
  padding-right: 1em;