Skip to content

Commit d906734

Browse files
committed
Long module names push down properties box
1 parent 417fe73 commit d906734

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

datafiles/static/hackage.css

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ table.properties td, table.properties th {
312312

313313
@media only screen and (min-width: 1920px) {
314314
#content {
315+
/* keep this in sync with #left-pane children */
315316
width: 60vw;
316317
}
317318
}
@@ -375,18 +376,28 @@ table.properties td, table.properties th {
375376
margin-bottom: 2em;
376377
}
377378

378-
#left-pane {
379-
margin-right: 2em;
380-
/* The margin is subtracted. Without this line, a narrow left-pane would
381-
* leave a narrow properties pane with space on the right. So we make the
382-
* left-pane take the space that the properties pane is not allotted.
383-
* That leaves no space on the right. */
384-
width: calc(60% - 2em);
379+
#left-pane > * {
380+
/* (100% - (width of properties)) * (width of #content) - gap
381+
* = (100% - 40% ) * 60vw - 2em
382+
* = 60% * 60vw - 2em
383+
* = 36vw - 2em
384+
*/
385+
width: calc(36vw - 2em);
386+
}
387+
388+
#left-pane > #modules {
389+
/* This overrides the width in the previous block. We want a long module
390+
* name to make the left-pane wide, so that it will push down
391+
* #properties.
392+
*/
393+
width: fit-content;
385394
}
386395

387396
#flex-container {
388397
display: flex;
389398
flex-wrap: wrap;
399+
justify-content: space-between;
400+
gap: 2em; /* keep this in sync with calculation above */
390401
}
391402
}
392403

@@ -845,10 +856,6 @@ ul.links li form button {
845856
padding-left: 1em;
846857
}
847858

848-
#module-list {
849-
overflow-x: auto;
850-
}
851-
852859
#module-list ul {
853860
list-style: none;
854861
margin: 0 0 0 20px;

0 commit comments

Comments
 (0)