File tree Expand file tree Collapse file tree
lib/rdoc/generator/template/aliki Expand file tree Collapse file tree Original file line number Diff line number Diff line change 153153 <%- end %>
154154
155155 <%- if method . type_signature %>
156- < div class ="method-type-signature ">
157- <%- method . type_signature . split ( "\n " ) . each do |sig | %>
158- < code > <%= h ( sig ) . gsub ( '->' , '→' ) %> </ code >
159- <%- end %>
160- </ div >
156+ < pre class ="method-type-signature "> < code > <%= method . type_signature . split ( "\n " ) . map { |sig | h ( sig ) . gsub ( '->' , '→' ) } . join ( "\n " ) %> </ code > </ pre >
161157 <%- end %>
162158 </ div >
163159
Original file line number Diff line number Diff line change @@ -1324,25 +1324,35 @@ main .method-heading .method-args {
13241324 font-weight : var (--font-weight-normal );
13251325}
13261326
1327- /* Type signatures — method overloads stack vertically under the name */
1328- main .method-header .method-type-signature {
1329- display : flex;
1330- flex-wrap : wrap;
1331- gap : var (--space-1 );
1332- }
1333-
1334- main .method-type-signature code {
1327+ /* Type signatures — overloads stack as a code block under the method name */
1328+ pre .method-type-signature {
1329+ margin : 0 ;
1330+ padding : 0 ;
1331+ background : transparent;
1332+ border : none;
13351333 font-family : var (--font-code );
13361334 font-size : var (--font-size-sm );
1337- font-weight : var (--font-weight-normal );
13381335 color : var (--color-text-secondary );
1336+ line-height : var (--line-height-normal );
1337+ white-space : pre-wrap;
1338+ overflow-wrap : break-word;
1339+ }
1340+
1341+ pre .method-type-signature code {
1342+ font-family : inherit;
1343+ font-size : inherit;
1344+ color : inherit;
13391345 background : transparent;
1346+ padding : 0 ;
13401347}
13411348
13421349/* Attribute type sigs render inline after the [RW] badge */
13431350main .method-heading > .method-type-signature {
13441351 display : inline;
13451352 margin-left : var (--space-2 );
1353+ font-family : var (--font-code );
1354+ font-size : var (--font-size-sm );
1355+ color : var (--color-text-secondary );
13461356}
13471357
13481358main .method-controls {
You can’t perform that action at this time.
0 commit comments