Skip to content

Commit e83af21

Browse files
jacksonhvisualspixar-oss
authored andcommitted
Documentation: Fix ReadTheDocs's narrow viewport layout issues
Closes #3883 (Internal change: 2386236)
1 parent 3f150da commit e83af21

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/_static/css/pxr_custom.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
--monospace: ui-monospace, -apple-system-ui-serif, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, 'Andale Mono', 'Ubuntu Mono', monospace;
66
}
77

8+
.document {
9+
container-type: inline-size;
10+
container-name: document;
11+
}
12+
813
body, .rst-content {
914
font-family: var(--san-serif);
1015
}
@@ -37,6 +42,10 @@ h4 {
3742
text-decoration: underline;
3843
}
3944

45+
.mono {
46+
overflow-wrap: break-word;
47+
}
48+
4049
.mono, .rst-content .linenodiv pre, .rst-content div[class^=highlight] pre, .rst-content pre.literal-block {
4150
font-family: var(--monospace)
4251
}
@@ -153,3 +162,24 @@ div.usd-tutorial-admonition > p {
153162
color: #6A0E0E;
154163
}
155164

165+
@container document (max-width: 72rem) {
166+
.fourcolumn {
167+
-webkit-column-count: 3; /* Chrome, Safari, Opera */
168+
-moz-column-count: 3; /* Firefox */
169+
column-count: 3;
170+
}
171+
}
172+
173+
@container document (max-width: 48rem) {
174+
.fourcolumn {
175+
-webkit-column-count: 2; /* Chrome, Safari, Opera */
176+
-moz-column-count: 2; /* Firefox */
177+
column-count: 2;
178+
}
179+
180+
.threecolumn {
181+
-webkit-column-count: 2; /* Chrome, Safari, Opera */
182+
-moz-column-count: 2; /* Firefox */
183+
column-count: 2;
184+
}
185+
}

0 commit comments

Comments
 (0)