Skip to content

Commit 4497e5c

Browse files
committed
deploy: 6b90563
1 parent bd7db57 commit 4497e5c

60 files changed

Lines changed: 392 additions & 126 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="_static/jquery.js?v=5d32c60e"></script>

_static/custom.css

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
/* SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors */
3+
4+
/* ==========================================================================
5+
Custom styles for Safety-Critical Rust Coding Guidelines
6+
========================================================================== */
7+
8+
/* --------------------------------------------------------------------------
9+
1. Fix parent containers that clip content
10+
11+
RTD theme and sphinx-needs may have overflow:hidden on containers.
12+
We need to allow content to either wrap (text) or scroll (code).
13+
-------------------------------------------------------------------------- */
14+
15+
/* Remove any hidden overflow from content containers */
16+
.wy-nav-content,
17+
.rst-content,
18+
.document,
19+
article,
20+
section,
21+
.section {
22+
overflow: visible !important;
23+
}
24+
25+
/* Sphinx-needs containers - these are the gray boxes */
26+
.need,
27+
.needs_container,
28+
div[class*="need_"],
29+
table.need,
30+
.needs_table_container {
31+
overflow: visible !important;
32+
max-width: 100% !important;
33+
box-sizing: border-box !important;
34+
}
35+
36+
/* The content wrapper inside needs */
37+
.needs_content,
38+
.need_content,
39+
td.needs_content,
40+
.needs_body {
41+
overflow: visible !important;
42+
max-width: 100% !important;
43+
box-sizing: border-box !important;
44+
}
45+
46+
/* --------------------------------------------------------------------------
47+
2. Force text wrapping everywhere
48+
-------------------------------------------------------------------------- */
49+
50+
/* Apply aggressive word wrapping to all text containers */
51+
.rst-content p,
52+
.rst-content li,
53+
.rst-content dd,
54+
.rst-content td,
55+
.rst-content th,
56+
.rst-content div,
57+
.needs_content,
58+
.needs_content p,
59+
.need_content,
60+
.need_content p,
61+
td.needs_content,
62+
td.needs_content p {
63+
word-wrap: break-word !important;
64+
overflow-wrap: break-word !important;
65+
word-break: break-word !important;
66+
max-width: 100% !important;
67+
box-sizing: border-box !important;
68+
}
69+
70+
/* Sphinx-needs metadata fields */
71+
.needs_meta,
72+
.needs_meta span,
73+
[class*="needs_"] {
74+
word-wrap: break-word !important;
75+
overflow-wrap: break-word !important;
76+
white-space: normal !important;
77+
}
78+
79+
/* Keep individual links together but allow wrapping between them */
80+
.needs_data a {
81+
white-space: nowrap;
82+
display: inline;
83+
}
84+
85+
/* --------------------------------------------------------------------------
86+
3. Code blocks - must scroll, never wrap or clip
87+
-------------------------------------------------------------------------- */
88+
89+
/* The wrapper div needs to scroll */
90+
div.highlight,
91+
.rst-content div.highlight,
92+
.highlight,
93+
.rust-example-container {
94+
overflow-x: auto !important;
95+
overflow-y: visible !important;
96+
max-width: 100% !important;
97+
box-sizing: border-box !important;
98+
}
99+
100+
/* Code blocks need to scroll, not wrap */
101+
pre,
102+
div.highlight pre,
103+
.rst-content div.highlight pre,
104+
.highlight pre,
105+
.rust-example-container pre,
106+
.rust-example-code {
107+
white-space: pre !important;
108+
overflow-x: auto !important;
109+
overflow-y: visible !important;
110+
word-wrap: normal !important;
111+
overflow-wrap: normal !important;
112+
max-width: 100% !important;
113+
box-sizing: border-box !important;
114+
}
115+
116+
/* Code inside needs containers specifically */
117+
.need pre,
118+
.needs_container pre,
119+
.needs_content pre,
120+
td.needs_content pre,
121+
.need div.highlight,
122+
.needs_container div.highlight,
123+
.needs_content div.highlight,
124+
td.needs_content div.highlight {
125+
overflow-x: auto !important;
126+
max-width: 100% !important;
127+
box-sizing: border-box !important;
128+
}
129+
130+
.need div.highlight pre,
131+
.needs_container div.highlight pre,
132+
.needs_content div.highlight pre,
133+
td.needs_content div.highlight pre {
134+
white-space: pre !important;
135+
overflow-x: auto !important;
136+
word-wrap: normal !important;
137+
}
138+
139+
/* --------------------------------------------------------------------------
140+
4. Inline code
141+
-------------------------------------------------------------------------- */
142+
143+
/* Allow inline code to break in flowing text */
144+
p code,
145+
li code,
146+
td code,
147+
.rst-content p code,
148+
.rst-content li code,
149+
code.literal {
150+
white-space: normal !important;
151+
word-break: break-word !important;
152+
}
153+
154+
/* --------------------------------------------------------------------------
155+
5. Paragraph spacing inside sphinx-needs content
156+
157+
Ensure proper visual separation between paragraphs in guideline content.
158+
-------------------------------------------------------------------------- */
159+
160+
/* Add margin between paragraphs in needs content */
161+
/* The actual class is "need content" (two classes), not "needs_content" */
162+
.need.content p,
163+
td.need.content p,
164+
.needs_content p,
165+
td.needs_content p,
166+
.need_content p {
167+
margin-bottom: 1em !important;
168+
}
169+
170+
/* But not on the last paragraph */
171+
.need.content p:last-child,
172+
td.need.content p:last-child,
173+
.needs_content p:last-child,
174+
td.needs_content p:last-child,
175+
.need_content p:last-child {
176+
margin-bottom: 0 !important;
177+
}
178+
179+
/* Also ensure lists have proper spacing */
180+
.need.content ul,
181+
.need.content ol,
182+
td.need.content ul,
183+
td.need.content ol,
184+
.needs_content ul,
185+
.needs_content ol {
186+
margin-top: 0.5em !important;
187+
margin-bottom: 1em !important;
188+
}
189+
190+
/* --------------------------------------------------------------------------
191+
6. Table fixes for sphinx-needs (uses tables internally)
192+
-------------------------------------------------------------------------- */
193+
194+
table.need,
195+
.needs_table,
196+
table[class*="need"] {
197+
table-layout: fixed !important;
198+
width: 100% !important;
199+
max-width: 100% !important;
200+
}
201+
202+
table.need td,
203+
table.need th,
204+
.needs_table td,
205+
.needs_table th {
206+
word-wrap: break-word !important;
207+
overflow-wrap: break-word !important;
208+
max-width: 100% !important;
209+
}

appendices/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../_static/jquery.js?v=5d32c60e"></script>

appendices/licenses.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../_static/jquery.js?v=5d32c60e"></script>

appendices/standards-matrices.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../_static/jquery.js?v=5d32c60e"></script>

coding-guidelines/associated-items/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../../_static/jquery.js?v=5d32c60e"></script>
@@ -116,7 +117,7 @@
116117

117118
<section id="associated-items">
118119
<h1>Associated Items<a class="headerlink" href="#associated-items" title="Link to this heading"></a></h1>
119-
<div class="need_container docutils container" id="SNCB-07f04aad">
120+
<div class="need_container docutils container" id="SNCB-d62987fc">
120121
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_guideline docutils align-default" id="gui_ot2Zt3dd6of1">
121122
<tbody>
122123
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -139,7 +140,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
139140
</td>
140141
</tr>
141142
<tr class="need content row-odd"><td class="need content" colspan="1"><p>Any function shall not call itself directly or indirectly</p>
142-
<div class="need_container docutils container" id="SNCB-b6f25a7f">
143+
<div class="need_container docutils container" id="SNCB-f360ce28">
143144
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_rationale docutils align-default" id="rat_gvoKeVSKK8fD">
144145
<tbody>
145146
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -160,7 +161,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
160161
</tbody>
161162
</table>
162163
</div>
163-
<div class="need_container docutils container" id="SNCB-0aa14f24">
164+
<div class="need_container docutils container" id="SNCB-eef998a9">
164165
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_non_compliant_example docutils align-default" id="non_compl_ex_MxqhjfkStJJy">
165166
<tbody>
166167
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -203,7 +204,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
203204
</tbody>
204205
</table>
205206
</div>
206-
<div class="need_container docutils container" id="SNCB-b0648792">
207+
<div class="need_container docutils container" id="SNCB-5c5331d0">
207208
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_compliant_example docutils align-default" id="compl_ex_9pK3h65rfceO">
208209
<tbody>
209210
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">

coding-guidelines/attributes/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../../_static/jquery.js?v=5d32c60e"></script>

coding-guidelines/concurrency/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../../_static/jquery.js?v=5d32c60e"></script>

coding-guidelines/entities-and-resolution/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../../_static/jquery.js?v=5d32c60e"></script>

coding-guidelines/exceptions-and-errors/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/common_css/need_style.css?v=92936fa5" />
2020
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-needs/modern.css?v=803738c0" />
21+
<link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=558c75d0" />
2122

2223

2324
<script src="../../_static/jquery.js?v=5d32c60e"></script>

0 commit comments

Comments
 (0)