@readme/markdown 6.75.0-beta.4 → 6.75.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.
@@ -1,33 +1,40 @@
1
1
  .markdown-body .embed {
2
- $B: '.embed';
3
- & {
4
- padding: 15px;
5
- color: var(--md-code-text, inherit);
6
- border-radius: var(--md-code-radius, var(--markdown-radius, 3px));
7
- border-radius: 3px;
8
- background: transparent;
9
- box-shadow: inset 0 0 0 1px rgba(black, .15);
10
- transition: .3s ease;
11
- &:hover {
12
- background: var(--md-code-background, #f6f8fa);
13
- box-shadow: inset 0 0 0 1px rgba(black, .1);
2
+ $embed: '.embed';
3
+
4
+ background: transparent;
5
+ border-radius: 3px;
6
+ border-radius: var(--md-code-radius, var(--markdown-radius, 3px));
7
+ box-shadow: inset 0 0 0 1px rgba(black, 0.15);
8
+ color: var(--md-code-text, inherit);
9
+ padding: 15px;
10
+ transition: 0.3s ease;
11
+
12
+ &:hover {
13
+ background: var(--md-code-background, #f6f8fa);
14
+ box-shadow: inset 0 0 0 1px rgba(black, 0.1);
15
+ }
16
+
17
+ @at-root .markdown-body > #{$embed}_hasImg:nth-of-type(odd) {
18
+ margin-right: 30px;
19
+ padding-right: 0;
20
+ #{$embed}-link {
21
+ flex-direction: row-reverse;
14
22
  }
15
- @at-root .markdown-body > #{$B}_hasImg:nth-of-type(odd) {
16
- margin-right: 30px;
17
- padding-right: 0;
18
- #{$B}-link { flex-direction: row-reverse }
19
- #{$B}-img {
20
- margin-left: .88em;
21
- margin-right: -30px;
22
- box-shadow: -.3em .3em .9em -.3em rgba(black, .15);
23
- }
23
+ #{$embed}-img {
24
+ box-shadow: -0.3em 0.3em 0.9em -0.3em rgba(black, 0.15);
25
+ margin-left: 0.88em;
26
+ margin-right: -30px;
24
27
  }
25
- @at-root .markdown-body > #{$B}_hasImg:nth-of-type(even) {
26
- margin-left: 30px;
27
- padding-left: 0;
28
- #{$B}-img { margin-left: -30px }
28
+ }
29
+
30
+ @at-root .markdown-body > #{$embed}_hasImg:nth-of-type(even) {
31
+ margin-left: 30px;
32
+ padding-left: 0;
33
+ #{$embed}-img {
34
+ margin-left: -30px;
29
35
  }
30
36
  }
37
+
31
38
  &:empty {
32
39
  display: none;
33
40
  }
@@ -35,84 +42,87 @@
35
42
  &-media {
36
43
  display: flex;
37
44
  justify-content: center;
38
- >:only-child {
45
+
46
+ > :only-child {
47
+ border-radius: 0 !important;
39
48
  flex: 1;
40
49
  margin: -15px;
41
- border-radius: 0 !important;
42
50
  }
43
51
  }
44
52
 
45
53
  &-link {
46
- display: flex;
47
54
  align-items: center;
48
55
  color: var(--markdown-text, #333);
56
+ display: flex;
49
57
  text-decoration: none !important;
50
58
  }
51
59
 
52
60
  &-body {
53
61
  flex: 1;
54
62
  line-height: 1.3;
55
- &, #{$B}-title {
63
+ &,
64
+ #{$embed}-title {
56
65
  font-size: 1.15em;
57
66
  overflow: hidden;
58
- white-space: nowrap;
59
67
  text-overflow: ellipsis;
68
+ white-space: nowrap;
60
69
  }
61
- #{$B}-provider {
70
+ #{$embed}-provider {
62
71
  display: block;
72
+ opacity: 0.88;
63
73
  text-decoration-color: transparent !important;
64
- opacity: .88;
65
74
  }
75
+
66
76
  &-url {
67
- opacity: .75;
77
+ opacity: 0.75;
68
78
  }
69
79
  }
70
80
 
71
81
  &-provider {
72
82
  font-size: 0.8em;
73
83
  line-height: 1.6;
84
+ transition: 0.2 ease;
85
+
86
+ code {
87
+ opacity: 0.8;
88
+ }
74
89
 
75
90
  code:only-child {
76
- display: block;
77
- width: 100%;
78
- font-size: 1.15em;
79
- overflow: hidden;
80
- white-space: nowrap;
81
- text-overflow: ellipsis;
82
91
  background: transparent;
92
+ display: block;
93
+ font-size: inherit !important;
83
94
  margin: 0;
95
+ overflow: hidden;
84
96
  padding: 0;
85
- font-size: inherit !important;
86
- }
87
- transition: .2 ease;
88
- code {
89
- opacity: 0.8;
97
+ text-overflow: ellipsis;
98
+ white-space: nowrap;
99
+ width: 100%;
90
100
  }
91
- }
101
+ }
92
102
 
93
103
  &-img {
94
- width: 5em;
95
- max-width: 5em;
96
- margin: 0 .88em 0 0;
97
- padding: 4px;
98
104
  background: white;
99
- border: 1px solid rgba(black, .15);
105
+ border: 1px solid rgba(black, 0.15);
100
106
  border-radius: 3px;
107
+ box-shadow: 0.3em 0.3em 0.9em -0.3em rgba(black, 0.15);
108
+ margin: 0 0.88em 0 0;
109
+ max-width: 5em;
110
+ padding: 4px;
101
111
  transition: inherit;
102
- box-shadow: .3em .3em .9em -.3em rgba(black, .15);
112
+ width: 5em;
103
113
  }
104
- &:not(:hover) #{$B}-img {
105
- box-shadow: 0 .25em 1em -.5em rgba(black, .133);
114
+ &:not(:hover) #{$embed}-img {
115
+ box-shadow: 0 0.25em 1em -0.5em rgba(black, 0.133);
106
116
  }
107
- &:hover #{$B}-img {
108
- border: 1px solid rgba(black, .2);
117
+ &:hover #{$embed}-img {
118
+ border: 1px solid rgba(black, 0.2);
109
119
  }
110
120
 
111
121
  &-favicon {
112
- width: 12px !important;
113
122
  height: 12px !important;
114
- margin-top: 4px;
115
- margin-right: 6px;
116
123
  margin-bottom: 12px;
124
+ margin-right: 6px;
125
+ margin-top: 4px;
126
+ width: 12px !important;
117
127
  }
118
- }
128
+ }
@@ -31,7 +31,7 @@ GlossaryItem.propTypes = {
31
31
  PropTypes.shape({
32
32
  definition: PropTypes.string.isRequired,
33
33
  term: PropTypes.string.isRequired,
34
- })
34
+ }),
35
35
  ).isRequired,
36
36
  };
37
37
 
@@ -1,36 +1,47 @@
1
+ /* stylelint-disable declaration-property-value-disallowed-list */
2
+ /* stylelint-disable custom-property-pattern */
3
+ /* stylelint-disable order/order */
1
4
  .GlossaryItem {
2
5
  &-trigger {
3
- border-bottom: 1px solid #737c83;
4
- border-style: dotted;
5
- border-top: none;
6
+ border-bottom: 1px dotted #737c83;
6
7
  border-left: none;
7
8
  border-right: none;
9
+ border-top: none;
8
10
  cursor: pointer;
9
11
  }
10
12
 
11
13
  &-tooltip-content {
12
14
  --GlossaryItem-bg: var(--color-bg-page, var(--white));
13
15
  --GlossaryItem-color: var(--color-text-default, var(--gray20));
14
- --GlossaryItem-shadow: var(--box-shadow-menu-light, 0 5px 10px rgba(0, 0, 0, .05),
15
- 0 2px 6px rgba(0, 0, 0, .025),
16
- 0 1px 3px rgba(0, 0, 0, .025));
16
+ --GlossaryItem-shadow: var(
17
+ --box-shadow-menu-light,
18
+ 0 5px 10px rgba(0, 0, 0, 0.05),
19
+ 0 2px 6px rgba(0, 0, 0, 0.025),
20
+ 0 1px 3px rgba(0, 0, 0, 0.025)
21
+ );
17
22
 
18
23
  /* what the dark-mode mixin does in the readme project */
19
24
  [data-color-mode='dark'] & {
20
25
  --GlossaryItem-bg: var(--gray15);
21
26
  --GlossaryItem-color: var(--color-text-default, var(--white));
22
- --GlossaryItem-shadow: var(--box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025),
27
+ --GlossaryItem-shadow: var(
28
+ --box-shadow-menu-dark,
29
+ 0 1px 3px rgba(0, 0, 0, 0.025),
23
30
  0 2px 6px rgba(0, 0, 0, 0.025),
24
- 0 5px 10px rgba(0, 0, 0, 0.05))
31
+ 0 5px 10px rgba(0, 0, 0, 0.05)
32
+ );
25
33
  }
26
34
 
27
35
  @media (prefers-color-scheme: dark) {
28
- [data-color-mode='auto'] & {
36
+ [data-color-mode='system'] & {
29
37
  --GlossaryItem-bg: var(--Tooltip-bg, var(--gray0));
30
38
  --GlossaryItem-color: var(--color-text-default, var(--white));
31
- --GlossaryItem-shadow: var(--box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025),
39
+ --GlossaryItem-shadow: var(
40
+ --box-shadow-menu-dark,
41
+ 0 1px 3px rgba(0, 0, 0, 0.025),
32
42
  0 2px 6px rgba(0, 0, 0, 0.025),
33
- 0 5px 10px rgba(0, 0, 0, 0.05))
43
+ 0 5px 10px rgba(0, 0, 0, 0.05)
44
+ );
34
45
  }
35
46
  }
36
47
 
@@ -56,8 +56,7 @@ HTMLBlock.propTypes = {
56
56
  const CreateHtmlBlock =
57
57
  ({ safeMode }) =>
58
58
  // eslint-disable-next-line react/display-name
59
- props =>
60
- <HTMLBlock {...props} safeMode={safeMode} />;
59
+ props => <HTMLBlock {...props} safeMode={safeMode} />;
61
60
 
62
61
  CreateHtmlBlock.sanitize = schema => {
63
62
  schema.tagNames.push('html-block');
@@ -25,7 +25,7 @@ function Heading({ tag, showAnchorIcons, ...props }) {
25
25
  aria-label={`Skip link to ${headingText}`}
26
26
  className="heading-anchor-icon fa fa-anchor"
27
27
  href={`#${props.id}`}
28
- />
28
+ />,
29
29
  );
30
30
  }
31
31
 
@@ -1,37 +1,43 @@
1
1
  .heading.heading {
2
+ align-items: center;
2
3
  display: flex;
3
4
  justify-content: flex-start;
4
- align-items: center;
5
5
  position: relative;
6
+
6
7
  .heading-text {
7
8
  flex: 1 100%;
8
9
  }
10
+
9
11
  .heading-anchor-deprecated {
10
12
  position: absolute;
11
13
  top: 0;
12
14
  }
15
+
13
16
  .heading-anchor {
14
17
  top: -1rem !important;
15
18
  }
19
+
16
20
  .heading-anchor,
17
21
  .heading-anchor-icon {
18
- position: absolute !important;
22
+ color: inherit;
19
23
  display: inline !important;
24
+ font-size: 0.8rem !important;
25
+ margin-right: -0.8rem;
20
26
  order: -1;
27
+ padding: 0.8rem 0.2rem 0.8rem 0 !important;
28
+ position: absolute !important;
21
29
  right: 100%;
22
- top: unset !important;
23
- margin-right: -.8rem;
24
- padding: .8rem .2rem .8rem 0 !important;
25
- font-size: .8rem !important;
26
30
  text-decoration: none;
27
- color: inherit;
31
+ top: unset !important;
28
32
  transform: translateX(-100%);
29
- transition: .2s ease;
33
+ transition: 0.2s ease;
34
+
30
35
  &:hover {
31
36
  opacity: 1;
32
37
  }
33
38
  }
39
+
34
40
  &:not(:hover) .heading-anchor-icon {
35
41
  opacity: 0;
36
42
  }
37
- }
43
+ }
@@ -48,15 +48,12 @@ class Image extends React.Component {
48
48
 
49
49
  render() {
50
50
  const { props } = this;
51
-
52
- const { alt, lazy = true } = props;
51
+ const { alt, lazy = true, ...otherProps } = props;
53
52
 
54
53
  if (this.isEmoji) {
55
- return <img {...props} alt={alt} loading={lazy ? 'lazy' : ''} />;
54
+ return <img alt={alt} loading={lazy ? 'lazy' : ''} {...otherProps} />;
56
55
  }
57
56
 
58
- const align = props.align === 'center' ? 'middle' : props.align;
59
-
60
57
  return (
61
58
  <span
62
59
  aria-label={alt}
@@ -67,7 +64,7 @@ class Image extends React.Component {
67
64
  tabIndex={0}
68
65
  >
69
66
  <span className="lightbox-inner">
70
- <img {...props} align={align} alt={alt} loading={lazy ? 'lazy' : ''} />
67
+ <img alt={alt} loading={lazy ? 'lazy' : ''} {...otherProps} />
71
68
  </span>
72
69
  </span>
73
70
  );
@@ -105,7 +102,6 @@ Image.sanitize = sanitizeSchema => {
105
102
  const CreateImage =
106
103
  ({ lazyImages }) =>
107
104
  // eslint-disable-next-line react/display-name
108
- props =>
109
- <Image lazy={lazyImages} {...props} />;
105
+ props => <Image lazy={lazyImages} {...props} />;
110
106
 
111
107
  module.exports = CreateImage;
@@ -1,12 +1,17 @@
1
+ /* stylelint-disable selector-max-compound-selectors */
2
+ /* stylelint-disable no-descending-specificity */
3
+ /* stylelint-disable font-family-no-missing-generic-family-keyword */
1
4
  %img-align {
2
5
  &-right {
3
6
  float: right;
4
7
  margin-left: 0.75rem;
5
8
  }
9
+
6
10
  &-left {
7
11
  float: left;
8
12
  margin-right: 0.75rem;
9
13
  }
14
+
10
15
  &-center {
11
16
  display: block;
12
17
  }
@@ -14,36 +19,35 @@
14
19
 
15
20
  .markdown-body {
16
21
  img {
17
- & {
18
- box-sizing: content-box;
19
- display: inline-block;
20
- vertical-align: middle;
21
- max-width: 100%;
22
- margin-left: auto;
23
- margin-right: auto;
24
- border-style: none;
25
-
26
- outline: none !important;
27
- }
22
+ border-style: none;
23
+ box-sizing: content-box;
24
+ display: inline-block;
25
+ margin-left: auto;
26
+ margin-right: auto;
27
+ max-width: 100%;
28
+ outline: none !important;
29
+ vertical-align: middle;
28
30
 
29
31
  &[align='right'],
30
32
  &[alt~='align-right'] {
31
33
  @extend %img-align-right;
32
34
  }
35
+
33
36
  &[align='left'],
34
37
  &[alt~='align-left'] {
35
38
  @extend %img-align-left;
36
39
  }
40
+
37
41
  &[width='80%'],
38
- &[align='middle'],
42
+ &[align='center'],
39
43
  &[alt~='align-center'] {
40
44
  @extend %img-align-center;
41
45
  }
42
46
 
43
47
  &[width='smart'] {
44
- width: auto;
45
- max-width: 100%;
46
48
  max-height: 450px;
49
+ max-width: 100%;
50
+ width: auto;
47
51
  }
48
52
 
49
53
  &.border {
@@ -52,13 +56,12 @@
52
56
  }
53
57
 
54
58
  figure {
55
- & {
56
- margin: 15px auto;
57
- }
59
+ margin: 15px auto;
60
+
58
61
  figcaption {
59
- margin-top: 8px;
60
62
  font-size: 0.93em;
61
63
  font-style: italic;
64
+ margin-top: 8px;
62
65
  text-align: center;
63
66
  }
64
67
  }
@@ -69,83 +72,81 @@
69
72
  }
70
73
 
71
74
  figure .img {
72
- display: inline-block;
73
- &,
74
- > img:only-of-type {
75
- display: block;
76
- }
75
+ display: block;
77
76
  }
78
77
 
79
78
  .lightbox.open {
80
- & {
81
- position: fixed;
82
- z-index: 9999999;
83
- top: 0;
84
- left: 0;
85
-
86
- display: flex;
87
- flex-flow: nowrap column;
88
- justify-content: flex-start;
89
- align-items: center;
90
-
91
- width: 100vw;
92
- height: 100vh;
93
- overflow: hidden;
94
- overflow-y: scroll;
95
- background: rgba(white, 0.966);
96
- user-select: none;
97
-
98
- margin-top: 0;
99
- margin-bottom: 0;
100
- }
79
+ align-items: center;
80
+ background: rgba(white, 0.966);
81
+ display: flex;
82
+ flex-flow: nowrap column;
83
+ height: 100vh;
84
+ justify-content: flex-start;
85
+ left: 0;
86
+ margin-bottom: 0;
87
+ margin-top: 0;
88
+ overflow: hidden;
89
+ overflow-y: scroll;
90
+ position: fixed;
91
+ top: 0;
92
+ user-select: none;
93
+ width: 100vw;
94
+ z-index: 9999999;
101
95
 
102
96
  // Close Button
103
- //
104
- &:after {
105
- position: fixed;
106
- top: 1em;
107
- right: 1em;
97
+ &::after {
108
98
  content: '\f00d';
99
+ cursor: pointer;
109
100
  display: inline-block;
110
101
  font: normal normal normal 2em/1 FontAwesome;
111
102
  font-size: inherit;
112
- text-rendering: auto;
113
103
  -webkit-font-smoothing: antialiased;
114
104
  -moz-osx-font-smoothing: grayscale;
115
- transform: translate(0, 0);
116
- display: inline-block;
117
- cursor: pointer;
118
-
119
105
  opacity: 1;
106
+ position: fixed;
107
+ right: 1em;
108
+ text-rendering: auto;
109
+ top: 1em;
110
+ transform: translate(0, 0);
120
111
  transform: scale(1.5);
121
112
  transition: 0.3s 0.3s ease-in;
122
113
  }
123
- &:not(.open):after {
124
- transform: scale(0);
114
+
115
+ &:not(.open)::after {
125
116
  opacity: 0;
117
+ transform: scale(0);
126
118
  }
127
119
 
128
120
  .lightbox-inner {
129
- position: relative;
121
+ align-items: center;
122
+ box-sizing: content-box;
130
123
  display: inline-flex;
131
124
  justify-content: center;
132
- align-items: center;
133
- min-height: calc(100vh + 8px);
134
125
  margin: auto;
126
+ min-height: calc(100vh + 8px);
135
127
  padding: 0;
136
- box-sizing: content-box;
128
+ position: relative;
137
129
  }
138
130
 
139
131
  img {
140
- width: auto !important;
141
132
  height: auto !important;
142
- min-width: unset !important;
143
- max-width: 97.5vw !important;
144
133
  max-height: 97.5vh !important;
134
+ max-width: 97.5vw !important;
135
+ min-width: unset !important;
136
+ width: auto !important;
137
+
145
138
  &.border,
146
139
  &:not([src$='.png']):not([src$='.svg']):not([src$='.jp2']):not([src$='.tiff']) {
147
140
  box-shadow: 0 0.5em 3em -1em rgba(0, 0, 0, 0.2);
148
141
  }
142
+
143
+ &[src$='svg'] {
144
+ display: block !important;
145
+ height: 66vw !important;
146
+ max-width: 100% !important;
147
+ min-width: 200px !important;
148
+ width: 42vw !important;
149
+ }
149
150
  }
150
151
  }
151
152
  }
@@ -19,8 +19,7 @@ Style.propTypes = {
19
19
  const CreateStyle =
20
20
  ({ safeMode }) =>
21
21
  // eslint-disable-next-line react/display-name
22
- props =>
23
- <Style {...props} safeMode={safeMode} />;
22
+ props => <Style {...props} safeMode={safeMode} />;
24
23
 
25
24
  CreateStyle.sanitize = sanitize => {
26
25
  sanitize.tagNames.push('style');
@@ -1,15 +1,14 @@
1
- @mixin markdown-table(
2
- $row: #fff,
3
- $head: #f6f8fa,
4
- $stripe: #fbfcfd,
5
- $edges: #dfe2e5,
6
- ) {
1
+ /* stylelint-disable selector-max-compound-selectors */
2
+ /* stylelint-disable no-descending-specificity */
3
+ /* stylelint-disable declaration-property-value-disallowed-list */
4
+ /* stylelint-disable scss/selector-no-redundant-nesting-selector */
5
+ @mixin markdown-table($row: #fff, $head: #f6f8fa, $stripe: #fbfcfd, $edges: #dfe2e5) {
7
6
  table {
8
- display: table;
9
7
  border-collapse: collapse;
10
8
  border-spacing: 0;
11
- width: 100%;
12
9
  color: var(--table-text);
10
+ display: table;
11
+ width: 100%;
13
12
 
14
13
  thead {
15
14
  color: var(--table-head-text, inherit);
@@ -21,6 +20,7 @@
21
20
 
22
21
  tr {
23
22
  background-color: var(--table-row, #{$row});
23
+
24
24
  & + tr {
25
25
  border-top: 1px solid var(--table-edges, #{$edges});
26
26
  }
@@ -29,6 +29,7 @@
29
29
  th,
30
30
  thead td {
31
31
  font-weight: 600;
32
+
32
33
  &:empty {
33
34
  padding: 0;
34
35
  }
@@ -36,13 +37,20 @@
36
37
 
37
38
  td,
38
39
  th {
39
- padding: 0;
40
- color: inherit;
41
- vertical-align: middle;
42
40
  border: 1px solid var(--table-edges, #{$edges});
41
+ color: inherit;
43
42
  padding: 6px 13px;
44
- > :first-child, > :only-child { margin-top: 0 !important }
45
- > :last-child, > :only-child { margin-bottom: 0 !important }
43
+ vertical-align: middle;
44
+
45
+ > :first-child,
46
+ > :only-child {
47
+ margin-top: 0 !important;
48
+ }
49
+
50
+ > :last-child,
51
+ > :only-child {
52
+ margin-bottom: 0 !important;
53
+ }
46
54
  }
47
55
 
48
56
  &:not(.plain) tr:nth-child(2n) {
@@ -57,10 +65,8 @@
57
65
  .rdmd-table {
58
66
  $border-wrap-width: 1px;
59
67
 
60
- & {
61
- display: block;
62
- position: relative;
63
- }
68
+ display: block;
69
+ position: relative;
64
70
 
65
71
  &-inner {
66
72
  box-sizing: content-box;