Skip to content

Commit e70854b

Browse files
authored
Fix source code styling issues (#1487)
- By setting width to 100%, it ensures the source code container takes up the full width of its parent container. - By setting box-sizing to border-box, it ensures when the source code block expands, it doesn't overflow the container. - By limiting the method header's width, it ensures that the source code toggle doesn't get pushed down to a weird position.
1 parent be2efc2 commit e70854b

File tree

1 file changed

+3
-0
lines changed
  • lib/rdoc/generator/template/aliki/css

1 file changed

+3
-0
lines changed

lib/rdoc/generator/template/aliki/css/rdoc.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,8 @@ main .method-source-code {
11191119

11201120
main .method-source-code pre {
11211121
border-color: var(--color-accent-hover);
1122+
width: 100%;
1123+
box-sizing: border-box;
11221124
}
11231125

11241126
main .method-source-code.active-menu {
@@ -1143,6 +1145,7 @@ main .method-detail:target {
11431145

11441146
main .method-header {
11451147
display: inline-block;
1148+
max-width: calc(100% - 6em); /* 6em is the width of the source code toggle */
11461149
}
11471150

11481151
main .method-heading {

0 commit comments

Comments
 (0)