Skip to content

Commit 2127dd9

Browse files
authored
Topic/libdoc html (robotframework#3675)
New libdoc html format. Responsive, communicating Robot Framework brand and easier overview beside details UX pattern. Most of this is done with none custom CSS to achieve future proof.
1 parent 177a41c commit 2127dd9

File tree

12 files changed

+795
-379
lines changed

12 files changed

+795
-379
lines changed

atest/robot/libdoc/internal_linking.robot

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ Linking to sections in introduction
99
${MODEL} Introduction Library INTROduction
1010
${MODEL} Importing importing
1111
${MODEL} Importing Library Importing
12-
${MODEL} Shortcuts ShortCuts
1312
${MODEL} Keywords Keywords
1413

1514
Linking to sections in importing and keywords
1615
${MODEL['inits'][0]} Introduction introduction
1716
${MODEL['keywords'][1]} Importing Importing
18-
${MODEL['keywords'][2]} Shortcuts shortcuts
1917

2018
Linking to keywords in introduction
2119
${MODEL} Keyword Keyword

atest/robot/libdoc/toc.robot

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Simple TOC
99
... - `First entry`
1010
... - `Second`
1111
... - `Third=entry`
12-
... - `Shortcuts`
1312
... - `Keywords`
1413
...
1514
... = First entry =
@@ -34,8 +33,6 @@ TOC with inits and tags
3433
... - `Second`
3534
... - `3`
3635
... - `Importing`
37-
... - `Shortcuts`
38-
... - `Tags`
3936
... - `Keywords`
4037
...
4138
... = Second =
@@ -54,8 +51,6 @@ TOC in generated HTML
5451
... <li><a href="#Second" class="name">Second</a></li>
5552
... <li><a href="#3" class="name">3</a></li>
5653
... <li><a href="#Importing" class="name">Importing</a></li>
57-
... <li><a href="#Shortcuts" class="name">Shortcuts</a></li>
58-
... <li><a href="#Tags" class="name">Tags</a></li>
5954
... <li><a href="#Keywords" class="name">Keywords</a></li>
6055
... </ul>
6156
... <h2 id="Second">Second</h2>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#introduction-container > h2,
2+
.doc > h1,
3+
.doc > h2,
4+
.section > h1,
5+
.section > h2 {
6+
margin-top: 4rem;
7+
margin-bottom: 1rem;
8+
}
9+
10+
.doc > h3, .section > h3 {
11+
margin-top: 3rem;
12+
margin-bottom: 1rem;
13+
}
14+
15+
.doc > h4, .section > h4 {
16+
margin-top: 2rem;
17+
margin-bottom: 1rem;
18+
}
19+
20+
.doc > p, .section > p {
21+
margin-top: 1rem;
22+
margin-bottom: 0.5rem;
23+
}
24+
.doc > *:first-child {
25+
margin-top: 0.1em;
26+
}
27+
.doc table {
28+
border: none;
29+
background: transparent;
30+
border-collapse: collapse;
31+
empty-cells: show;
32+
font-size: 0.9em;
33+
overflow-y: auto;
34+
display: block;
35+
}
36+
.doc table th, .doc table td {
37+
border: 1px solid var(--border-color);
38+
background: transparent;
39+
padding: 0.1em 0.3em;
40+
height: 1.2em;
41+
}
42+
.doc table th {
43+
text-align: center;
44+
letter-spacing: 0.1em;
45+
}
46+
.doc pre {
47+
font-size: 1.1em;
48+
letter-spacing: 0.05em;
49+
background: var(--light-background-color);
50+
overflow-y: auto;
51+
padding: 0.3rem;
52+
border-radius: 3px;
53+
}
54+
55+
.doc code,
56+
.docutils.literal {
57+
font-size: 1.1em;
58+
letter-spacing: 0.05em;
59+
background: var(--light-background-color);
60+
padding: 1px;
61+
border-radius: 3px;
62+
}
63+
.doc li {
64+
list-style-position: inside;
65+
list-style-type: square;
66+
}
67+
.doc img {
68+
border: 1px solid #ccc;
69+
}
70+
.doc hr {
71+
background: #ccc;
72+
height: 1px;
73+
border: 0;
74+
}

0 commit comments

Comments
 (0)