Skip to content

Commit 3c452d4

Browse files
authored
Merge pull request #77 from strictdoc-project/stanislaw/mutation
feat(submodules/html2pdf): update to the latest version
2 parents f1b6b50 + 65bd151 commit 3c452d4

26 files changed

Lines changed: 6866 additions & 4 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# HTML2PDF4Doc JS file.
22
# html2pdf4doc/html2pdf4doc_js/
33

4+
.DS_Store
45
.venv/
56
.vscode
67
.idea/

html2pdf4doc/html2pdf4doc_js/html2pdf4doc.min.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

submodules/html2pdf

Submodule html2pdf updated 287 files
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
/* A wrapper for styling the markup generated by MarkupRenderer. */
2+
3+
sdoc-autogen {
4+
/*
5+
TODO: 'display: contents;'
6+
Turn this back on when the bug is fixed:
7+
Selenium cannot detect text inside a container
8+
with the 'display: contents;' directive
9+
*/
10+
/* display: contents; */
11+
12+
/* hyphens: auto; */
13+
14+
--autogen-v-rhythm: calc(var(--base-rhythm, 8px) * 2);
15+
}
16+
17+
sdoc-autogen a,
18+
sdoc-autogen a:link,
19+
sdoc-autogen a:visited {
20+
text-decoration: underline;
21+
}
22+
23+
/* Table */
24+
25+
sdoc-autogen table {
26+
border-collapse: collapse;
27+
margin: var(--base-padding) 0;
28+
font-size: 1rem;
29+
30+
/*** add scroll for wide tables */
31+
/* issue#1370 https://css-tricks.com/preventing-a-grid-blowout/ */
32+
/* border: 1px solid #ccc; */
33+
border: none;
34+
display: block;
35+
overflow-x: auto;
36+
white-space: nowrap;
37+
}
38+
39+
sdoc-autogen table caption {
40+
font-weight: bold;
41+
padding-bottom: 1rem;
42+
}
43+
44+
sdoc-autogen table th {
45+
background-color: var(--color-bg-main);
46+
}
47+
48+
sdoc-autogen table th,
49+
sdoc-autogen table td {
50+
padding: var(--base-rhythm) calc(var(--base-rhythm) * 1.5);
51+
vertical-align: top;
52+
text-align: left;
53+
border: 1px solid #ccc;
54+
55+
/* issue#1370 https://css-tricks.com/preventing-a-grid-blowout/ */
56+
/*** add scroll for wide tables (unset) */
57+
white-space: initial;
58+
}
59+
60+
/* Typography */
61+
62+
sdoc-autogen p {
63+
margin: var(--autogen-v-rhythm) 0;
64+
}
65+
66+
/* blockquote */
67+
68+
sdoc-autogen blockquote {
69+
color: #666;
70+
padding: .25em 0 0.25em 1rem;
71+
border-left: 4px solid #ccc;
72+
margin: var(--autogen-v-rhythm) 0;
73+
}
74+
75+
/* pre.code */
76+
77+
sdoc-autogen pre.code {
78+
font-family: var(--code-font-family);
79+
80+
font-size: var(--code-font-size);
81+
line-height: 2;
82+
margin: var(--code-font-size) 0;
83+
padding: calc(var(--code-font-size)*1)
84+
calc(var(--code-font-size)*1)
85+
calc(var(--code-font-size)*1)
86+
calc(var(--code-font-size)*2);
87+
88+
overflow: auto;
89+
background-color: var(--color-bg-main);
90+
border: 1px solid var(--color-border);
91+
}
92+
93+
/* We have to override this for the print version because the printer
94+
interprets scroll-bars differently in different environments,
95+
which breaks HTML2PDF.
96+
Also, we need to show the whole code in its entirety.
97+
*/
98+
[html2pdf] sdoc-autogen pre.code {
99+
overflow: unset;
100+
white-space: pre-wrap;
101+
overflow-wrap: break-word;
102+
}
103+
104+
/* ``some text`` is generated into: <tt class="docutils literal"> by docutils. */
105+
sdoc-autogen tt.literal {
106+
position: relative;
107+
padding: 0 4px;
108+
font-style: normal;
109+
font-family: var(--code-font-family);
110+
font-size: var(--code-font-size);
111+
background-color: var(--color-bg-main);
112+
border: 1px solid var(--color-border);
113+
border-radius: 4px;
114+
115+
overflow-wrap: break-word;
116+
word-wrap: break-word;
117+
-webkit-box-decoration-break: clone;
118+
box-decoration-break: clone;
119+
}
120+
121+
/* ul */
122+
123+
sdoc-autogen ul,
124+
sdoc-autogen ol {
125+
padding-left: 1.6em;
126+
margin: var(--autogen-v-rhythm) 0;
127+
}
128+
129+
/* list in table */
130+
sdoc-autogen td ul,
131+
sdoc-autogen dt ol {
132+
margin: 0;
133+
padding-left: 1em;
134+
}
135+
136+
/* object */
137+
138+
sdoc-autogen img,
139+
sdoc-autogen svg,
140+
sdoc-autogen object {
141+
max-width: 100%;
142+
height: auto;
143+
padding: 1em 0;
144+
background: var(--color-bg-contrast);
145+
}
146+
147+
/*
148+
**************************
149+
automatically added by RST
150+
**************************
151+
*/
152+
153+
div.document {
154+
/* alarm style for detecting unwrapped blocks */
155+
border: 1px dashed red;
156+
}
157+
158+
sdoc-autogen div.document {
159+
display: contents;
160+
border: none;
161+
}
162+
163+
/* block margins */
164+
165+
sdoc-autogen .document > *:first-child, /* RST */
166+
sdoc-autogen > *:first-child {
167+
margin-top: 0 !important;
168+
}
169+
170+
sdoc-autogen .document > *:last-child, /* RST */
171+
sdoc-autogen > *:last-child {
172+
margin-bottom: 0 !important;
173+
}
174+
175+
/* admonition by RST */
176+
/* "attention", "caution", "danger", "error", "hint", "important", "note", "tip", "warning" */
177+
178+
sdoc-autogen .admonition {
179+
display: block;
180+
overflow: hidden;
181+
padding: 0 var(--autogen-v-rhythm);
182+
border: var(--requirement-border-width, 1px) solid;
183+
border-radius: var(--requirement-border-radius);
184+
margin: var(--autogen-v-rhythm) 0;
185+
color: var(--color-fg-main);
186+
}
187+
188+
sdoc-autogen .admonition .admonition-title {
189+
margin: 0;
190+
padding-top: calc(0.5 * var(--base-rhythm));
191+
padding-bottom: calc(0.5 * var(--base-rhythm));
192+
color: currentColor;
193+
font-weight: 600;
194+
position: relative;
195+
}
196+
197+
sdoc-autogen .admonition .admonition-title::after {
198+
content: '';
199+
position: absolute;
200+
top: 0; bottom: 0;
201+
left: calc(-1 * var(--autogen-v-rhythm));
202+
right: calc(-1 * var(--autogen-v-rhythm));
203+
/* background:repeating-linear-gradient(
204+
-45deg,
205+
rgba(255, 255, 255, .25),
206+
rgba(255, 255, 255, .25) 10px,
207+
rgba(255, 255, 255, .0) 10px,
208+
rgba(255, 255, 255, .0) 20px
209+
); */
210+
background-color: currentColor;
211+
opacity: 0.1;
212+
}
213+
214+
sdoc-autogen .admonition > *:not(.admonition-title) {
215+
color: var(--color-fg-main);
216+
}
217+
218+
sdoc-autogen .admonition.attention {
219+
color: Crimson;
220+
}
221+
222+
sdoc-autogen .admonition.caution {
223+
color: Crimson;
224+
}
225+
226+
sdoc-autogen .admonition.important {
227+
color: OrangeRed;
228+
}
229+
230+
sdoc-autogen .admonition.danger {
231+
color: red;
232+
}
233+
234+
sdoc-autogen .admonition.error {
235+
color: Red;
236+
}
237+
238+
sdoc-autogen .admonition.warning {
239+
color: DarkOrange;
240+
}
241+
242+
sdoc-autogen .admonition.warning .admonition-title::before {
243+
/* content: '⚠️'; */
244+
margin-right: var(--base-rhythm);
245+
}
246+
247+
sdoc-autogen .admonition.note {
248+
/* color: CornflowerBlue; */
249+
color: SteelBlue;
250+
}
251+
252+
sdoc-autogen .admonition.hint {
253+
color: DarkSlateBlue;
254+
}
255+
256+
sdoc-autogen .admonition.tip {
257+
color: MediumSlateBlue;
258+
}

0 commit comments

Comments
 (0)