just-the-docs 0.2.4 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/_includes/css/custom.scss.liquid +1 -0
  4. data/_includes/css/just-the-docs.scss.liquid +7 -0
  5. data/_includes/head.html +25 -13
  6. data/_includes/head_custom.html +0 -0
  7. data/_includes/js/custom.js +0 -0
  8. data/_includes/nav.html +41 -34
  9. data/_includes/title.html +5 -0
  10. data/_includes/vendor/anchor_headings.html +100 -0
  11. data/_layouts/default.html +100 -39
  12. data/_layouts/table_wrappers.html +7 -0
  13. data/_layouts/vendor/compress.html +10 -0
  14. data/_sass/base.scss +16 -18
  15. data/_sass/buttons.scss +1 -1
  16. data/_sass/code.scss +209 -69
  17. data/_sass/color_schemes/dark.scss +3 -1
  18. data/_sass/color_schemes/light.scss +0 -0
  19. data/_sass/content.scss +79 -0
  20. data/_sass/custom/custom.scss +0 -120
  21. data/_sass/labels.scss +5 -4
  22. data/_sass/layout.scss +90 -29
  23. data/_sass/modules.scss +19 -0
  24. data/_sass/navigation.scss +4 -32
  25. data/_sass/search.scss +98 -45
  26. data/_sass/support/_functions.scss +2 -3
  27. data/_sass/support/_variables.scss +20 -20
  28. data/_sass/support/mixins/_layout.scss +1 -3
  29. data/_sass/support/mixins/_typography.scss +6 -1
  30. data/_sass/tables.scss +13 -33
  31. data/_sass/typography.scss +10 -8
  32. data/_sass/utilities/_layout.scss +75 -18
  33. data/_sass/utilities/_lists.scss +7 -1
  34. data/_sass/utilities/_spacing.scss +70 -26
  35. data/_sass/utilities/_typography.scss +1 -1
  36. data/assets/css/just-the-docs-dark.scss +3 -0
  37. data/assets/css/just-the-docs-default.scss +8 -0
  38. data/assets/css/just-the-docs-light.scss +3 -0
  39. data/assets/js/just-the-docs.js +240 -103
  40. data/assets/js/search-data.json +4 -4
  41. data/assets/js/vendor/lunr.min.js +3 -3
  42. data/lib/tasks/search.rake +4 -4
  43. metadata +47 -25
  44. data/assets/css/dark-mode-preview.scss +0 -41
  45. data/assets/css/just-the-docs.scss +0 -44
@@ -0,0 +1,7 @@
1
+ ---
2
+ layout: vendor/compress
3
+ ---
4
+
5
+ {% assign content_ = content | replace: '<table', '<div class="table-wrapper"><table' %}
6
+ {% assign content_ = content_ | replace: '</table>', '</table></div>' %}
7
+ {{ content_ }}
@@ -0,0 +1,10 @@
1
+ ---
2
+ # Jekyll layout that compresses HTML
3
+ # v3.1.0
4
+ # http://jch.penibelst.de/
5
+ # © 2014–2015 Anatol Broder
6
+ # MIT License
7
+ ---
8
+
9
+ {% capture _LINE_FEED %}
10
+ {% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
@@ -14,6 +14,7 @@
14
14
 
15
15
  html {
16
16
  @include fs-4;
17
+ scroll-behavior: smooth;
17
18
  }
18
19
 
19
20
  body {
@@ -24,25 +25,18 @@ body {
24
25
  background-color: $body-background-color;
25
26
  }
26
27
 
27
- p,
28
- h1,
29
- h2,
30
- h3,
31
- h4,
32
- h5,
33
- h6,
34
28
  ol,
35
29
  ul,
30
+ dl,
36
31
  pre,
37
32
  address,
38
33
  blockquote,
39
- dl,
34
+ table,
40
35
  div,
41
- fieldset,
42
- form,
43
36
  hr,
44
- noscript,
45
- table {
37
+ form,
38
+ fieldset,
39
+ noscript .table-wrapper {
46
40
  margin-top: 0;
47
41
  }
48
42
 
@@ -52,14 +46,15 @@ h3,
52
46
  h4,
53
47
  h5,
54
48
  h6 {
55
- margin-top: 1.2em;
56
- margin-bottom: 0.8em;
49
+ margin-top: 0;
50
+ margin-bottom: 1em;
57
51
  font-weight: 500;
58
52
  line-height: $body-heading-line-height;
59
53
  color: $body-heading-color;
60
54
  }
61
55
 
62
56
  p {
57
+ margin-top: 1em;
63
58
  margin-bottom: 1em;
64
59
  }
65
60
 
@@ -76,19 +71,22 @@ a:not([class]) {
76
71
  background-size: 1px 1px;
77
72
 
78
73
  &:hover {
79
- background-image: linear-gradient(rgba($link-color, 0.45) 0%, rgba($link-color, 0.45) 100%);
74
+ background-image: linear-gradient(
75
+ rgba($link-color, 0.45) 0%,
76
+ rgba($link-color, 0.45) 100%
77
+ );
80
78
  background-size: 1px 1px;
81
-
82
79
  }
83
80
  }
84
81
 
85
82
  code {
86
83
  font-family: $mono-font-family;
87
- font-size: 12px;
84
+ font-size: 0.75em;
88
85
  line-height: $body-line-height;
89
86
  }
90
87
 
91
- figure {
88
+ figure,
89
+ pre {
92
90
  margin: 0;
93
91
  }
94
92
 
@@ -21,7 +21,7 @@
21
21
  cursor: pointer;
22
22
  background-color: $base-button-color;
23
23
  border-width: 0;
24
- border-radius: 3px;
24
+ border-radius: $border-radius;
25
25
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
26
26
  appearance: none;
27
27
 
@@ -11,8 +11,10 @@ code {
11
11
  border-radius: $border-radius;
12
12
  }
13
13
 
14
- pre.highlight {
14
+ pre.highlight,
15
+ figure.highlight {
15
16
  padding: $sp-3;
17
+ margin-top: 0;
16
18
  margin-bottom: 0;
17
19
  -webkit-overflow-scrolling: touch;
18
20
  background-color: $code-background-color;
@@ -29,74 +31,212 @@ pre.highlight {
29
31
  border-radius: $border-radius;
30
32
  }
31
33
 
32
- .highlight .c { color: #586e75; } // comment //
33
- .highlight .err { color: #93a1a1; } // error //
34
- .highlight .g { color: #93a1a1; } // generic //
35
- .highlight .k { color: #859900; } // keyword //
36
- .highlight .l { color: #93a1a1; } // literal //
37
- .highlight .n { color: #93a1a1; } // name //
38
- .highlight .o { color: #859900; } // operator //
39
- .highlight .x { color: #cb4b16; } // other //
40
- .highlight .p { color: #93a1a1; } // punctuation //
41
- .highlight .cm { color: #586e75; } // comment.multiline //
42
- .highlight .cp { color: #859900; } // comment.preproc //
43
- .highlight .c1 { color: #586e75; } // comment.single //
44
- .highlight .cs { color: #859900; } // comment.special //
45
- .highlight .gd { color: #2aa198; } // generic.deleted //
46
- .highlight .ge { font-style: italic; color: #93a1a1; } // generic.emph //
47
- .highlight .gr { color: #dc322f; } // generic.error //
48
- .highlight .gh { color: #cb4b16; } // generic.heading //
49
- .highlight .gi { color: #859900; } // generic.inserted //
50
- .highlight .go { color: #93a1a1; } // generic.output //
51
- .highlight .gp { color: #93a1a1; } // generic.prompt //
52
- .highlight .gs { font-weight: bold; color: #93a1a1; } // generic.strong //
53
- .highlight .gu { color: #cb4b16; } // generic.subheading //
54
- .highlight .gt { color: #93a1a1; } // generic.traceback //
55
- .highlight .kc { color: #cb4b16; } // keyword.constant //
56
- .highlight .kd { color: #268bd2; } // keyword.declaration //
57
- .highlight .kn { color: #859900; } // keyword.namespace //
58
- .highlight .kp { color: #859900; } // keyword.pseudo //
59
- .highlight .kr { color: #268bd2; } // keyword.reserved //
60
- .highlight .kt { color: #dc322f; } // keyword.type //
61
- .highlight .ld { color: #93a1a1; } // literal.date //
62
- .highlight .m { color: #2aa198; } // literal.number //
63
- .highlight .s { color: #2aa198; } // literal.string //
64
- .highlight .na { color: #93a1a1; } // name.attribute //
65
- .highlight .nb { color: #b58900; } // name.builtin //
66
- .highlight .nc { color: #268bd2; } // name.class //
67
- .highlight .no { color: #cb4b16; } // name.constant //
68
- .highlight .nd { color: #268bd2; } // name.decorator //
69
- .highlight .ni { color: #cb4b16; } // name.entity //
70
- .highlight .ne { color: #cb4b16; } // name.exception //
71
- .highlight .nf { color: #268bd2; } // name.function //
72
- .highlight .nl { color: #93a1a1; } // name.label //
73
- .highlight .nn { color: #93a1a1; } // name.namespace //
74
- .highlight .nx { color: #555; } // name.other //
75
- .highlight .py { color: #93a1a1; } // name.property //
76
- .highlight .nt { color: #268bd2; } // name.tag //
77
- .highlight .nv { color: #268bd2; } // name.variable //
78
- .highlight .ow { color: #859900; } // operator.word //
79
- .highlight .w { color: #93a1a1; } // text.whitespace //
80
- .highlight .mf { color: #2aa198; } // literal.number.float //
81
- .highlight .mh { color: #2aa198; } // literal.number.hex //
82
- .highlight .mi { color: #2aa198; } // literal.number.integer //
83
- .highlight .mo { color: #2aa198; } // literal.number.oct //
84
- .highlight .sb { color: #586e75; } // literal.string.backtick //
85
- .highlight .sc { color: #2aa198; } // literal.string.char //
86
- .highlight .sd { color: #93a1a1; } // literal.string.doc //
87
- .highlight .s2 { color: #2aa198; } // literal.string.double //
88
- .highlight .se { color: #cb4b16; } // literal.string.escape //
89
- .highlight .sh { color: #93a1a1; } // literal.string.heredoc //
90
- .highlight .si { color: #2aa198; } // literal.string.interpol //
91
- .highlight .sx { color: #2aa198; } // literal.string.other //
92
- .highlight .sr { color: #dc322f; } // literal.string.regex //
93
- .highlight .s1 { color: #2aa198; } // literal.string.single //
94
- .highlight .ss { color: #2aa198; } // literal.string.symbol //
95
- .highlight .bp { color: #268bd2; } // name.builtin.pseudo //
96
- .highlight .vc { color: #268bd2; } // name.variable.class //
97
- .highlight .vg { color: #268bd2; } // name.variable.global //
98
- .highlight .vi { color: #268bd2; } // name.variable.instance //
99
- .highlight .il { color: #2aa198; } // literal.number.integer.long //
34
+ .highlight .c {
35
+ color: #586e75;
36
+ } // comment //
37
+ .highlight .err {
38
+ color: #93a1a1;
39
+ } // error //
40
+ .highlight .g {
41
+ color: #93a1a1;
42
+ } // generic //
43
+ .highlight .k {
44
+ color: #859900;
45
+ } // keyword //
46
+ .highlight .l {
47
+ color: #93a1a1;
48
+ } // literal //
49
+ .highlight .n {
50
+ color: #93a1a1;
51
+ } // name //
52
+ .highlight .o {
53
+ color: #859900;
54
+ } // operator //
55
+ .highlight .x {
56
+ color: #cb4b16;
57
+ } // other //
58
+ .highlight .p {
59
+ color: #93a1a1;
60
+ } // punctuation //
61
+ .highlight .cm {
62
+ color: #586e75;
63
+ } // comment.multiline //
64
+ .highlight .cp {
65
+ color: #859900;
66
+ } // comment.preproc //
67
+ .highlight .c1 {
68
+ color: #586e75;
69
+ } // comment.single //
70
+ .highlight .cs {
71
+ color: #859900;
72
+ } // comment.special //
73
+ .highlight .gd {
74
+ color: #2aa198;
75
+ } // generic.deleted //
76
+ .highlight .ge {
77
+ font-style: italic;
78
+ color: #93a1a1;
79
+ } // generic.emph //
80
+ .highlight .gr {
81
+ color: #dc322f;
82
+ } // generic.error //
83
+ .highlight .gh {
84
+ color: #cb4b16;
85
+ } // generic.heading //
86
+ .highlight .gi {
87
+ color: #859900;
88
+ } // generic.inserted //
89
+ .highlight .go {
90
+ color: #93a1a1;
91
+ } // generic.output //
92
+ .highlight .gp {
93
+ color: #93a1a1;
94
+ } // generic.prompt //
95
+ .highlight .gs {
96
+ font-weight: bold;
97
+ color: #93a1a1;
98
+ } // generic.strong //
99
+ .highlight .gu {
100
+ color: #cb4b16;
101
+ } // generic.subheading //
102
+ .highlight .gt {
103
+ color: #93a1a1;
104
+ } // generic.traceback //
105
+ .highlight .kc {
106
+ color: #cb4b16;
107
+ } // keyword.constant //
108
+ .highlight .kd {
109
+ color: #268bd2;
110
+ } // keyword.declaration //
111
+ .highlight .kn {
112
+ color: #859900;
113
+ } // keyword.namespace //
114
+ .highlight .kp {
115
+ color: #859900;
116
+ } // keyword.pseudo //
117
+ .highlight .kr {
118
+ color: #268bd2;
119
+ } // keyword.reserved //
120
+ .highlight .kt {
121
+ color: #dc322f;
122
+ } // keyword.type //
123
+ .highlight .ld {
124
+ color: #93a1a1;
125
+ } // literal.date //
126
+ .highlight .m {
127
+ color: #2aa198;
128
+ } // literal.number //
129
+ .highlight .s {
130
+ color: #2aa198;
131
+ } // literal.string //
132
+ .highlight .na {
133
+ color: #555;
134
+ } // name.attribute //
135
+ .highlight .nb {
136
+ color: #b58900;
137
+ } // name.builtin //
138
+ .highlight .nc {
139
+ color: #268bd2;
140
+ } // name.class //
141
+ .highlight .no {
142
+ color: #cb4b16;
143
+ } // name.constant //
144
+ .highlight .nd {
145
+ color: #268bd2;
146
+ } // name.decorator //
147
+ .highlight .ni {
148
+ color: #cb4b16;
149
+ } // name.entity //
150
+ .highlight .ne {
151
+ color: #cb4b16;
152
+ } // name.exception //
153
+ .highlight .nf {
154
+ color: #268bd2;
155
+ } // name.function //
156
+ .highlight .nl {
157
+ color: #555;
158
+ } // name.label //
159
+ .highlight .nn {
160
+ color: #93a1a1;
161
+ } // name.namespace //
162
+ .highlight .nx {
163
+ color: #555;
164
+ } // name.other //
165
+ .highlight .py {
166
+ color: #93a1a1;
167
+ } // name.property //
168
+ .highlight .nt {
169
+ color: #268bd2;
170
+ } // name.tag //
171
+ .highlight .nv {
172
+ color: #268bd2;
173
+ } // name.variable //
174
+ .highlight .ow {
175
+ color: #859900;
176
+ } // operator.word //
177
+ .highlight .w {
178
+ color: #93a1a1;
179
+ } // text.whitespace //
180
+ .highlight .mf {
181
+ color: #2aa198;
182
+ } // literal.number.float //
183
+ .highlight .mh {
184
+ color: #2aa198;
185
+ } // literal.number.hex //
186
+ .highlight .mi {
187
+ color: #2aa198;
188
+ } // literal.number.integer //
189
+ .highlight .mo {
190
+ color: #2aa198;
191
+ } // literal.number.oct //
192
+ .highlight .sb {
193
+ color: #586e75;
194
+ } // literal.string.backtick //
195
+ .highlight .sc {
196
+ color: #2aa198;
197
+ } // literal.string.char //
198
+ .highlight .sd {
199
+ color: #93a1a1;
200
+ } // literal.string.doc //
201
+ .highlight .s2 {
202
+ color: #2aa198;
203
+ } // literal.string.double //
204
+ .highlight .se {
205
+ color: #cb4b16;
206
+ } // literal.string.escape //
207
+ .highlight .sh {
208
+ color: #93a1a1;
209
+ } // literal.string.heredoc //
210
+ .highlight .si {
211
+ color: #2aa198;
212
+ } // literal.string.interpol //
213
+ .highlight .sx {
214
+ color: #2aa198;
215
+ } // literal.string.other //
216
+ .highlight .sr {
217
+ color: #dc322f;
218
+ } // literal.string.regex //
219
+ .highlight .s1 {
220
+ color: #2aa198;
221
+ } // literal.string.single //
222
+ .highlight .ss {
223
+ color: #2aa198;
224
+ } // literal.string.symbol //
225
+ .highlight .bp {
226
+ color: #268bd2;
227
+ } // name.builtin.pseudo //
228
+ .highlight .vc {
229
+ color: #268bd2;
230
+ } // name.variable.class //
231
+ .highlight .vg {
232
+ color: #268bd2;
233
+ } // name.variable.global //
234
+ .highlight .vi {
235
+ color: #268bd2;
236
+ } // name.variable.instance //
237
+ .highlight .il {
238
+ color: #2aa198;
239
+ } // literal.number.integer.long //
100
240
 
101
241
  //
102
242
  // Code examples (rendered)
@@ -1,4 +1,3 @@
1
-
2
1
  $body-background-color: $grey-dk-300;
3
2
  $sidebar-color: $grey-dk-300;
4
3
  $border-color: $grey-dk-200;
@@ -6,9 +5,12 @@ $border-color: $grey-dk-200;
6
5
  $body-text-color: $grey-lt-300;
7
6
  $body-heading-color: $grey-lt-000;
8
7
  $nav-child-link-color: $grey-dk-000;
8
+ $search-result-preview-color: $grey-dk-000;
9
9
 
10
10
  $link-color: $blue-000;
11
11
  $btn-primary-color: $blue-200;
12
12
  $base-button-color: $grey-dk-250;
13
13
 
14
14
  $code-background-color: $grey-dk-250;
15
+ $search-background-color: $grey-dk-250;
16
+ $table-background-color: $grey-dk-250;
File without changes
@@ -6,6 +6,18 @@
6
6
  // stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type
7
7
 
8
8
  .page-content {
9
+ line-height: $content-line-height;
10
+
11
+ ol,
12
+ ul,
13
+ dl,
14
+ pre,
15
+ address,
16
+ blockquote,
17
+ .table-wrapper {
18
+ margin-top: 0.5em;
19
+ }
20
+
9
21
  a {
10
22
  overflow: hidden;
11
23
  text-overflow: ellipsis;
@@ -17,6 +29,12 @@
17
29
  padding-left: 1.5em;
18
30
  }
19
31
 
32
+ li {
33
+ .highlight {
34
+ margin-top: $sp-1;
35
+ }
36
+ }
37
+
20
38
  ol {
21
39
  list-style-type: none;
22
40
  counter-reset: step-counter;
@@ -111,4 +129,65 @@
111
129
  margin-left: 1em;
112
130
  font-weight: 500;
113
131
  }
132
+
133
+ .anchor-heading {
134
+ position: absolute;
135
+ right: -$sp-4;
136
+ width: $sp-5;
137
+ height: 100%;
138
+ padding-right: $sp-1;
139
+ padding-left: $sp-1;
140
+ overflow: visible;
141
+
142
+ @include mq(md) {
143
+ right: auto;
144
+ left: -$sp-5;
145
+ }
146
+
147
+ svg {
148
+ display: inline-block;
149
+ width: 100%;
150
+ height: 100%;
151
+ fill: $link-color;
152
+ visibility: hidden;
153
+ }
154
+ }
155
+
156
+ .anchor-heading:hover,
157
+ h1:hover > .anchor-heading,
158
+ h2:hover > .anchor-heading,
159
+ h3:hover > .anchor-heading,
160
+ h4:hover > .anchor-heading,
161
+ h5:hover > .anchor-heading,
162
+ h6:hover > .anchor-heading {
163
+ svg {
164
+ visibility: visible;
165
+ }
166
+ }
167
+
168
+ h1,
169
+ h2,
170
+ h3,
171
+ h4,
172
+ h5,
173
+ h6 {
174
+ position: relative;
175
+ margin-top: 1.5em;
176
+ margin-bottom: 0.25em;
177
+
178
+ &:first-child {
179
+ margin-top: $sp-2;
180
+ }
181
+
182
+ + table,
183
+ + .table-wrapper,
184
+ + .code-example,
185
+ + .highlighter-rouge {
186
+ margin-top: 1em;
187
+ }
188
+
189
+ + p {
190
+ margin-top: 0;
191
+ }
192
+ }
114
193
  }