Skip to content

Commit fcef8e5

Browse files
msbtamotl
authored andcommitted
NG: Add styles for tables and finetune ul/ol/p margins
1 parent 3bc5b9f commit fcef8e5

File tree

3 files changed

+79
-9
lines changed

3 files changed

+79
-9
lines changed

src/crate/theme/rtd/crate/static/css/crateio-rtd.css

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ div.danger {
145145
}
146146

147147
/** MENUE **/
148-
.bs-docs-sidenav .toctree li {
149-
line-height: 16px;
150-
}
151-
152148
.bs-docs-sidenav .toctree li.border-top {
153149
border-top: 1px solid #e7e7e7;
154150
padding-top: 16px;
@@ -158,12 +154,18 @@ div.danger {
158154
.bs-docs-sidenav .toctree li a {
159155
text-decoration: none;
160156
font-size: 14px;
161-
line-height: 1.3;
157+
line-height: 1.2;
162158
color: black;
163159
padding: 4px 0px;
164160
display: block;
165161
}
166162

163+
@media all and (max-width: 540px) {
164+
.bs-docs-sidenav .toctree li a {
165+
line-height: 1.3;
166+
}
167+
}
168+
167169
.bs-docs-sidenav .toctree li.current > a,
168170
.bs-docs-sidenav .toctree li.active > a,
169171
.bs-docs-sidenav .toctree li.current > a code,
@@ -176,10 +178,12 @@ div.danger {
176178
display: block;
177179
}
178180

179-
.bs-docs-sidenav ol,
180-
.bs-docs-sidenav ul {
181-
margin-top: 4px !important;
182-
margin-bottom: 0px;
181+
@media all and (min-width: 768px) {
182+
.bs-docs-sidenav ol,
183+
.bs-docs-sidenav ul {
184+
margin-top: 1px !important;
185+
margin-bottom: 2px;
186+
}
183187
}
184188

185189
.bs-docs-sidenav .toctree ul ul ul {

src/crate/theme/rtd/crate/static/css/custom.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,3 +1629,58 @@ dt:target, span.highlighted {
16291629
header#top #menu-main-navigation {
16301630
margin: 0;
16311631
}
1632+
1633+
/* -- tables ---------------------------------------------------------------- */
1634+
1635+
table.docutils {
1636+
margin-top: 10px;
1637+
margin-bottom: 10px;
1638+
border: 0;
1639+
border-collapse: collapse;
1640+
}
1641+
1642+
table.align-center {
1643+
margin-left: auto;
1644+
margin-right: auto;
1645+
}
1646+
1647+
table.align-default {
1648+
margin-left: auto;
1649+
margin-right: auto;
1650+
}
1651+
1652+
table caption span.caption-number {
1653+
font-style: italic;
1654+
}
1655+
1656+
table.docutils td, table.docutils th {
1657+
padding: 1px 8px 1px 5px;
1658+
border-top: 0;
1659+
border-left: 0;
1660+
border-right: 0;
1661+
border-bottom: 1px solid #aaa;
1662+
}
1663+
1664+
th {
1665+
text-align: left;
1666+
padding-right: 5px;
1667+
}
1668+
1669+
table.citation {
1670+
border-left: solid 1px gray;
1671+
margin-left: 1px;
1672+
}
1673+
1674+
table.citation td {
1675+
border-bottom: none;
1676+
}
1677+
1678+
th > :first-child,
1679+
td > :first-child {
1680+
margin-top: 0px;
1681+
}
1682+
1683+
th > :last-child,
1684+
td > :last-child {
1685+
margin-bottom: 0px;
1686+
}

src/crate/theme/rtd/crate/static/css/ng/furo.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,14 @@ ol {
9292
}
9393
}
9494
}
95+
96+
//remove spacing when ul before p
97+
article p + ul,
98+
article p + ol {
99+
margin-top: 0;
100+
}
101+
102+
article p:has(+ ul),
103+
article p:has(+ ol) {
104+
margin-bottom: 4px;
105+
}

0 commit comments

Comments
 (0)