Skip to content

Commit a1c54f5

Browse files
kartbencfriedt
authored andcommitted
doc: css: make sidebar style available globally
The sidebar used for the "wikipedia"-style card in the documentation pages of board is actually something that is worth reusing elsewhere so move the corresponding styles from board.css to global custom.css Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
1 parent 3f66f0b commit a1c54f5

File tree

2 files changed

+64
-63
lines changed

2 files changed

+64
-63
lines changed

doc/_extensions/zephyr/domain/static/css/board.css

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,69 +4,6 @@
44
*/
55

66
/* Board overview "card" on board documentation pages */
7-
.sidebar.board-overview {
8-
border-radius: 12px;
9-
padding: 0px;
10-
background: var(--admonition-note-background-color);
11-
color: var(--admonition-note-title-color);
12-
border-color: var(--admonition-note-title-background-color);
13-
}
14-
15-
@media screen and (max-width: 480px) {
16-
.sidebar.board-overview {
17-
float: none;
18-
margin-left: 0;
19-
}
20-
}
21-
22-
.sidebar.board-overview {
23-
color: var(--admonition-note-color);
24-
}
25-
26-
.sidebar.board-overview .sidebar-title {
27-
font-family: var(--header-font-family);
28-
background: var(--admonition-note-title-background-color);
29-
color: var(--admonition-note-title-color);
30-
border-radius: 12px 12px 0px 0px;
31-
margin: 0px;
32-
text-align: center;
33-
}
34-
35-
.sidebar.board-overview figure {
36-
padding: 1rem;
37-
margin-bottom: -1rem;
38-
}
39-
40-
.sidebar.board-overview figure img {
41-
height: auto !important;
42-
}
43-
44-
.sidebar.board-overview figure figcaption p {
45-
margin-bottom: 0px;
46-
}
47-
48-
.sidebar.board-overview dl.field-list {
49-
align-items: center;
50-
margin-top: 12px !important;
51-
margin-bottom: 12px !important;
52-
grid-template-columns: auto 1fr !important;
53-
padding-right: 1em;
54-
}
55-
56-
.sidebar.board-overview dl.field-list>dt {
57-
background: transparent !important;
58-
}
59-
60-
.sidebar.board-overview dl.field-list>dd {
61-
margin-left: 1em;
62-
text-overflow: ellipsis;
63-
overflow: hidden;
64-
}
65-
66-
.sidebar.board-overview dl.field-list>dd code {
67-
font-size: 0.9em;
68-
}
69-
707
.sidebar.board-overview #board-github-link {
718
text-align: center;
729
margin-bottom: 1em;

doc/_static/css/custom.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,70 @@ div.graphviz > object {
927927
filter: var(--graphviz-filter);
928928
}
929929

930+
/* Sidebar */
931+
.rst-content .sidebar {
932+
border-radius: 12px;
933+
padding: 0px;
934+
background: var(--admonition-note-background-color);
935+
color: var(--admonition-note-title-color);
936+
border-color: var(--admonition-note-title-background-color);
937+
}
938+
939+
@media screen and (max-width: 480px) {
940+
.rst-content .sidebar {
941+
float: none;
942+
margin-left: 0;
943+
}
944+
}
945+
946+
.rst-content .sidebar {
947+
color: var(--admonition-note-color);
948+
}
949+
950+
.rst-content .sidebar .sidebar-title {
951+
font-family: var(--header-font-family);
952+
background: var(--admonition-note-title-background-color);
953+
color: var(--admonition-note-title-color);
954+
border-radius: 12px 12px 0px 0px;
955+
margin: 0px;
956+
text-align: center;
957+
}
958+
959+
.rst-content .sidebar figure {
960+
padding: 1rem;
961+
margin-bottom: -1rem;
962+
}
963+
964+
.rst-content .sidebar figure img {
965+
height: auto !important;
966+
}
967+
968+
.rst-content .sidebar figure figcaption p {
969+
margin-bottom: 0px;
970+
}
971+
972+
.rst-content .sidebar dl.field-list {
973+
align-items: center;
974+
margin-top: 12px !important;
975+
margin-bottom: 12px !important;
976+
grid-template-columns: auto 1fr !important;
977+
padding-right: 1em;
978+
}
979+
980+
.rst-content .sidebar dl.field-list>dt {
981+
background: transparent !important;
982+
}
983+
984+
.rst-content .sidebar dl.field-list>dd {
985+
margin-left: 1em;
986+
text-overflow: ellipsis;
987+
overflow: hidden;
988+
}
989+
990+
.rst-content .sidebar dl.field-list>dd code {
991+
font-size: 0.9em;
992+
}
993+
930994
/* Home page grid display */
931995
.grid {
932996
list-style-type: none !important;

0 commit comments

Comments
 (0)