@readme/markdown 6.62.2 → 6.62.4

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.
@@ -6,7 +6,7 @@ const Callout = props => {
6
6
  const [title, ...content] = !props.title ? [null, props.children] : props.children;
7
7
 
8
8
  return (
9
- // eslint-disable-next-line react/jsx-props-no-spreading
9
+ // eslint-disable-next-line react/jsx-props-no-spreading, react/no-unknown-property
10
10
  <blockquote {...attributes} className={`callout callout_${theme}`} theme={icon}>
11
11
  <h3 className={`callout-heading${title ? '' : ' empty'}`}>
12
12
  <span className="callout-icon">{icon}</span>
@@ -1,81 +1,100 @@
1
- @mixin callout ($l-offset: 1.33rem) {
1
+ /* stylelint-disable no-descending-specificity */
2
+ /* stylelint-disable font-family-no-missing-generic-family-keyword */
3
+ /* stylelint-disable order/properties-alphabetical-order */
4
+ /* stylelint-disable order/order */
5
+ @mixin callout($l-offset: 1.33rem) {
2
6
  --background: #{lighten(#dfe2e5, 8.75%)};
3
7
  --border: #{lighten(#6a737d, 12.5%)};
4
8
 
5
- & {
6
- background: var(--background);
7
- border-color: var(--border);
8
- color: var(--text);
9
- padding: $l-offset;
10
- }
9
+ background: var(--background);
10
+ border-color: var(--border);
11
+ color: var(--text);
12
+ padding: $l-offset;
11
13
 
12
14
  &_info {
13
15
  $color: #46b8da;
16
+
14
17
  --background: #e3edf2;
15
18
  --title: #{$color};
16
19
  --border: #{lighten($color, 5%)}; // should be #5bc0de
17
20
  }
18
21
 
19
- &_warn, &_warning {
22
+ &_warn,
23
+ &_warning {
20
24
  $color: #eea236;
25
+
21
26
  --background: #fcf8f2;
22
27
  --title: #{$color};
23
28
  --border: #{lighten($color, 5%)};
24
29
  }
25
30
 
26
- &_ok, &_okay, &_success {
31
+ &_ok,
32
+ &_okay,
33
+ &_success {
27
34
  $color: #489e49;
35
+
28
36
  --background: #f3f8f3;
29
37
  --title: #{$color};
30
38
  --border: #{lighten($color, 5%)}; // should be #50af51
31
39
  }
32
40
 
33
- &_err, &_error {
41
+ &_err,
42
+ &_error {
34
43
  $color: #d43f3a;
44
+
35
45
  --background: #fdf7f7;
36
46
  --title: #{$color};
37
- --border: #{lighten($color, 5%)}; // should be #d9534f
47
+ --border: #{lighten($color, 5%)}; // should be #d9534f
38
48
  }
39
49
 
40
50
  > * {
41
51
  margin-left: $l-offset;
42
52
  position: relative;
43
53
  }
44
- ul, ol {
54
+
55
+ ul,
56
+ ol {
45
57
  padding-left: 1.3em;
46
58
  }
47
59
 
48
60
  a {
49
61
  color: inherit;
50
62
  }
63
+
51
64
  hr {
52
65
  border-color: var(--border, var(--markdown-edge, #eee));
53
66
  }
67
+
54
68
  blockquote {
55
69
  color: var(--text);
56
70
  border-color: var(--border);
57
71
  border-width: 3px;
58
- padding: 0 0 0 .8em;
72
+ padding: 0 0 0 0.8em;
59
73
  }
60
74
 
61
75
  .callout-heading {
62
76
  color: var(--title, --text);
63
- margin-bottom: calc(#{$l-offset} * .5);
77
+ margin-bottom: calc(#{$l-offset} * 0.5);
78
+
64
79
  &:only-child {
65
80
  margin-bottom: 0;
66
81
  }
82
+
67
83
  &.empty {
68
84
  float: left;
69
- margin-top: calc(#{$l-offset} * .5);
85
+ margin-top: calc(#{$l-offset} * 0.5);
86
+
70
87
  .callout-icon {
71
88
  line-height: 0;
72
89
  }
73
90
  }
91
+
74
92
  > * {
75
93
  color: inherit;
76
94
  margin: 0;
77
95
  }
78
- &:before {
96
+
97
+ &::before {
79
98
  position: absolute;
80
99
  right: 100%;
81
100
  width: 2.4em;
@@ -83,20 +102,23 @@
83
102
  font: normal normal normal 1em/1 FontAwesome;
84
103
  }
85
104
  }
105
+
86
106
  .callout-icon {
87
107
  float: left;
88
- margin-left: calc(-#{$l-offset} - .5em);
89
- margin-right: -.25rem;
108
+ margin-left: calc(-#{$l-offset} - 0.5em);
109
+ margin-right: -0.25rem;
90
110
  }
91
111
  }
92
- @mixin calloutCustomIcons($R: callout) {
112
+ @mixin callout-custom-icons($R: callout) {
93
113
  --emoji: 1em;
94
- --icon-font: FontAwesome;
114
+ --icon-font: fontawesome;
115
+
95
116
  &-icon {
96
117
  font-size: var(--emoji, 0);
97
118
  color: var(--icon-color, inherit) !important;
98
119
  }
99
- &-icon:before {
120
+
121
+ &-icon::before {
100
122
  content: var(--icon);
101
123
  font-family: var(--icon-font);
102
124
  font-size: var(--icon-size, 1rem);
@@ -111,22 +133,27 @@
111
133
  }
112
134
  @at-root .rdmdCallouts--useIconFont & {
113
135
  --emoji: unset;
136
+
114
137
  &_okay {
115
138
  /* thumbs up */
116
- --icon: "\f164";
139
+ --icon: '\f164';
117
140
  }
141
+
118
142
  &_info {
119
143
  /* info circle */
120
- --icon: "\f05a";
144
+ --icon: '\f05a';
121
145
  }
146
+
122
147
  &_warn {
123
148
  /* warning triangle */
124
- --icon: "\f071";
149
+ --icon: '\f071';
125
150
  }
151
+
126
152
  &_error {
127
153
  /* warning circle */
128
- --icon: "\f06a";
154
+ --icon: '\f06a';
129
155
  }
156
+
130
157
  &_default {
131
158
  /* warning circle */
132
159
  --emoji: 1rem;
@@ -135,10 +162,12 @@
135
162
  }
136
163
 
137
164
  .callout {
138
- &.callout { // bump specificity
165
+ &.callout {
166
+ // bump specificity
139
167
  @include callout;
140
168
  }
141
- @include calloutCustomIcons;
169
+ @include callout-custom-icons;
170
+
142
171
  border-top-right-radius: var(--markdown-radius);
143
172
  border-bottom-right-radius: var(--markdown-radius);
144
173
  }
@@ -1,21 +1,27 @@
1
- @mixin gfmCodeBaseStyles($background: #F6F8FA, $background-dark: #242E34, $text: inherit) {
2
-
1
+ /* stylelint-disable no-duplicate-selectors */
2
+ /* stylelint-disable no-descending-specificity */
3
+ /* stylelint-disable font-family-no-missing-generic-family-keyword */
4
+ /* stylelint-disable declaration-property-value-disallowed-list */
5
+ /* stylelint-disable scss/selector-no-redundant-nesting-selector */
6
+ /* stylelint-disable order/properties-alphabetical-order */
7
+ @mixin gfm-code-base-styles($background: #f6f8fa, $background-dark: #242e34, $text: inherit) {
3
8
  code,
4
9
  kbd,
5
10
  pre {
6
- font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
11
+ font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;
7
12
  font-family: var(--md-code-font, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace);
8
- font-size: 1em
13
+ font-size: 1em;
9
14
  }
10
15
 
11
16
  code,
12
17
  pre {
13
- font-size: 12px
18
+ font-size: 12px;
14
19
  }
15
20
 
16
21
  pre {
17
22
  margin-bottom: 0;
18
- margin-top: 0
23
+ margin-top: 0;
24
+ word-wrap: normal;
19
25
  }
20
26
 
21
27
  code {
@@ -25,25 +31,21 @@
25
31
  color: var(--md-code-text);
26
32
  font-size: 85%;
27
33
  margin: 0;
28
- padding: .2em .4em;
34
+ padding: 0.2em 0.4em;
29
35
 
30
- >div[class*="cm-"] {
36
+ > div[class*='cm-'] {
31
37
  display: inherit;
32
38
  }
33
39
  }
34
40
 
35
- pre {
36
- word-wrap: normal
37
- }
38
-
39
- pre>code {
41
+ pre > code {
40
42
  background: 0 0;
41
43
  border: 0;
42
44
  font-size: 100%;
43
45
  margin: 0;
44
46
  padding: 0;
45
47
  white-space: pre;
46
- word-break: normal
48
+ word-break: normal;
47
49
  }
48
50
 
49
51
  pre {
@@ -57,7 +59,7 @@
57
59
  font-size: 85%;
58
60
  line-height: 1.45;
59
61
  overflow: auto;
60
- padding: 1em
62
+ padding: 1em;
61
63
  }
62
64
 
63
65
  pre code.theme-dark {
@@ -74,7 +76,7 @@
74
76
  max-width: auto;
75
77
  overflow: visible;
76
78
  padding: 0;
77
- word-wrap: normal
79
+ word-wrap: normal;
78
80
  }
79
81
 
80
82
  kbd {
@@ -89,89 +91,78 @@
89
91
  font-size: 11px;
90
92
  line-height: 10px;
91
93
  padding: 3px 5px;
92
- vertical-align: middle
94
+ vertical-align: middle;
93
95
  }
94
96
  }
95
97
 
96
- @mixin copyCodeButton {
98
+ @mixin copy-code-button {
97
99
  button.rdmd-code-copy {
98
- DISPLAY: none !important; // hide by default
99
-
100
- & {
101
- -webkit-appearance: unset;
102
- margin: .5em .6em 0 0;
103
- padding: .25em .7em;
104
- cursor: copy;
105
- font: inherit;
106
- color: inherit;
107
- color: var(--md-code-text, inherit);
108
- border: none;
109
- border-radius: 3px;
110
- outline: none !important;
111
- background: inherit;
112
- background: var(--md-code-background, inherit);
113
- box-shadow:
114
- inset 0 0 0 1px rgba(#aaa, .66),
115
- -1px 2px 6px -3px rgba(black, .1);
116
- transition: .15s ease-out;
117
- }
100
+ appearance: unset;
101
+ background: inherit;
102
+ background: var(--md-code-background, inherit);
103
+ border: none;
104
+ border-radius: 3px;
105
+ box-shadow: inset 0 0 0 1px rgba(#aaa, 0.66), -1px 2px 6px -3px rgba(black, 0.1);
106
+ color: inherit;
107
+ color: var(--md-code-text, inherit);
108
+ cursor: copy;
109
+ display: none !important; // hide by default
110
+ font: inherit;
111
+ margin: 0.5em 0.6em 0 0;
112
+ outline: none !important;
113
+ padding: 0.25em 0.7em;
114
+ transition: 0.15s ease-out;
118
115
 
119
116
  &:not(:hover) {
120
-
121
- &:before,
122
- &:after {
123
- opacity: .66;
117
+ &::before,
118
+ &::after {
119
+ opacity: 0.66;
124
120
  }
125
121
  }
126
122
 
127
123
  &:hover {
128
124
  &:not(:active) {
129
- box-shadow:
130
- inset 0 0 0 1px rgba(#8B8B8B, .75),
131
- -1px 2px 6px -3px rgba(black, .2);
125
+ box-shadow: inset 0 0 0 1px rgba(#8b8b8b, 0.75), -1px 2px 6px -3px rgba(black, 0.2);
132
126
  }
133
127
  }
134
128
 
135
129
  &:active {
136
- box-shadow:
137
- inset 0 0 0 1px rgba(#8B8B8B, .5),
138
- inset 1px 4px 6px -2px rgba(0, 0, 0, .175);
130
+ box-shadow: inset 0 0 0 1px rgba(#8b8b8b, 0.5), inset 1px 4px 6px -2px rgba(0, 0, 0, 17.5%);
139
131
 
140
- &:before,
141
- &:after {
142
- opacity: .75;
132
+ &::before,
133
+ &::after {
134
+ opacity: 0.75;
143
135
  }
144
136
  }
145
137
 
146
- &:before,
147
- &:after {
138
+ &::before,
139
+ &::after {
148
140
  display: inline-block;
149
- font: normal normal normal 1em/1 "Font Awesome 5 Free", "FontAwesome";
141
+ font: normal normal normal 1em/1 'Font Awesome 5 Free', FontAwesome;
142
+ font-family: ReadMe-Icons;
143
+ font-feature-settings: 'liga';
144
+ font-variant-ligatures: discretionary-ligatures;
145
+ line-height: 2;
150
146
  text-rendering: auto;
151
147
  -webkit-font-smoothing: antialiased;
152
-
153
- line-height: 2;
154
- font-family: 'ReadMe-Icons';
155
- font-variant-ligatures: discretionary-ligatures;
156
- font-feature-settings: "liga";
157
148
  }
158
149
 
159
- &:before {
160
- content: "\e6c9";
150
+ &::before {
151
+ content: '\e6c9';
161
152
  font-weight: 800;
162
- transition: .3s .15s ease;
153
+ transition: 0.3s 0.15s ease;
163
154
  }
164
155
 
165
- &:after {
156
+ &::after {
166
157
  // @todo why are these !important @rafe, you dumbell?
167
- content: "\e942" !important;
158
+ content: '\e942' !important;
168
159
  font-weight: 900 !important;
169
- position: absolute;
170
- top: 50%;
171
160
  left: 50%;
172
- transform: translate(-50%, -50%) scale(.33);
173
161
  opacity: 0 !important;
174
- transition: .3s 0s ease;
162
+ position: absolute;
163
+ top: 50%;
164
+ transform: translate(-50%, -50%) scale(0.33);
165
+ transition: 0.3s 0s ease;
175
166
  }
176
167
 
177
168
  &_copied {
@@ -184,16 +175,16 @@
184
175
  opacity: 1;
185
176
  }
186
177
 
187
- &:before {
188
- transition: .3s 0s ease;
189
- transform: scale(.33);
178
+ &::before {
190
179
  opacity: 0 !important;
180
+ transition: 0.3s 0s ease;
181
+ transform: scale(0.33);
191
182
  }
192
183
 
193
- &:after {
194
- transition: .3s .15s ease;
195
- transform: translate(-50%, -50%) scale(1);
184
+ &::after {
196
185
  opacity: 1 !important;
186
+ transition: 0.3s 0.15s ease;
187
+ transform: translate(-50%, -50%) scale(1);
197
188
  }
198
189
  }
199
190
  }
@@ -201,11 +192,11 @@
201
192
  pre {
202
193
  position: relative;
203
194
 
204
- >code {
195
+ > code {
205
196
  background: inherit;
206
197
  }
207
198
 
208
- >code.theme-dark {
199
+ > code.theme-dark {
209
200
  color: white;
210
201
  }
211
202
 
@@ -221,7 +212,7 @@
221
212
  overflow: hidden;
222
213
  padding: 0;
223
214
 
224
- >code {
215
+ > code {
225
216
  display: block !important;
226
217
  overflow: auto;
227
218
  padding: 1em;
@@ -232,7 +223,7 @@
232
223
  // manage copied state style
233
224
  & {
234
225
  &:hover button.rdmd-code-copy:not(:hover) {
235
- transition-delay: .4s;
226
+ transition-delay: 0.4s;
236
227
  }
237
228
 
238
229
  &:not(:hover) button.rdmd-code-copy:not(.rdmd-code-copy_copied) {
@@ -243,7 +234,7 @@
243
234
  }
244
235
 
245
236
  .markdown-body {
246
- // --md-code-background: #F6F8FA;
247
- @include gfmCodeBaseStyles;
248
- @include copyCodeButton;
237
+ // --md-code-background: #F6F8FA;
238
+ @include gfm-code-base-styles;
239
+ @include copy-code-button;
249
240
  }
@@ -1,21 +1,24 @@
1
+ /* stylelint-disable no-descending-specificity */
2
+ /* stylelint-disable declaration-property-value-disallowed-list */
1
3
  @import '~codemirror/lib/codemirror.css';
2
4
  @import '~codemirror/theme/neo.css';
3
5
 
4
- @mixin CodeTabs {
5
- $bgc-pre: #F6F8FA;
6
- $bgc-pre-dark: #242E34;
6
+ @mixin code-tabs {
7
+ $bgc-pre: #f6f8fa;
8
+ $bgc-pre-dark: #242e34;
7
9
  $bgc-bar: darken(desaturate($bgc-pre, 17.46), 4.31);
8
10
  $bgc-bar-dark: lighten(desaturate($bgc-pre-dark, 17.46), 4.31);
9
11
  $radius: var(--md-code-radius, var(--markdown-radius, 3px));
10
12
 
13
+ border-radius: $radius !important;
11
14
  color: #333;
12
15
  color: var(--md-code-text, #333);
13
- border-radius: $radius !important;
14
16
  overflow: hidden;
15
17
 
16
18
  &.theme-dark {
17
19
  color: white;
18
20
  color: var(--md-code-text, white);
21
+
19
22
  .CodeTabs-toolbar {
20
23
  background: $bgc-bar-dark;
21
24
  background: var(--md-code-tabs, $bgc-bar-dark);
@@ -28,27 +31,28 @@
28
31
  display: flex;
29
32
  flex-flow: row nowrap;
30
33
  overflow: hidden;
31
- overflow-x: auto;
32
- -ms-overflow-style: none;
33
34
  -webkit-overflow-scrolling: touch;
35
+ -ms-overflow-style: none;
36
+ overflow-x: auto;
37
+
34
38
  &::-webkit-scrollbar {
35
39
  display: none;
36
40
  }
41
+
37
42
  button {
38
- white-space: nowrap;
39
- transition: .123s ease;
40
- -webkit-appearance: none;
41
43
  appearance: none;
42
- display: inline-block;
43
- line-height: 2;
44
- padding: .5em 1em;
45
- border: none;
46
44
  background: transparent;
47
- outline: none;
45
+ border: none;
48
46
  color: inherit;
49
- font: inherit;
50
- font-size: .75em;
51
47
  cursor: pointer;
48
+ display: inline-block;
49
+ font: inherit;
50
+ font-size: 0.75em;
51
+ line-height: 2;
52
+ outline: none;
53
+ padding: 0.5em 1em;
54
+ transition: 0.123s ease;
55
+ white-space: nowrap;
52
56
  }
53
57
  }
54
58
 
@@ -70,15 +74,17 @@
70
74
  }
71
75
 
72
76
  &-toolbar button:not(.CodeTabs_active):hover {
73
- background: rgba(0, 0, 0, .075);
77
+ background: rgba(0, 0, 0, 7.5%);
74
78
  }
75
79
 
76
80
  pre {
77
- border-radius: 0 0 $radius $radius !important;
78
- background: $bgc-pre;
79
81
  background: var(--md-code-background, $bgc-pre);
82
+ border-radius: 0 0 $radius $radius !important;
80
83
  margin-bottom: 0;
81
- &:not(.CodeTabs_active) { display: none }
84
+
85
+ &:not(.CodeTabs_active) {
86
+ display: none;
87
+ }
82
88
  }
83
89
 
84
90
  &.theme-dark pre {
@@ -92,5 +98,5 @@
92
98
  }
93
99
 
94
100
  .CodeTabs {
95
- @include CodeTabs;
101
+ @include code-tabs;
96
102
  }