Skip to content

Commit 69fc9ce

Browse files
committed
Add "Example" label to example code blocks
The label should help users distinguish example code blocks from other code blocks, such as method source code. It's only applied to Ruby code examples.
1 parent ac7409b commit 69fc9ce

File tree

1 file changed

+18
-0
lines changed
  • lib/rdoc/generator/template/darkfish/css

1 file changed

+18
-0
lines changed

lib/rdoc/generator/template/darkfish/css/rdoc.css

+18
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,24 @@ main .method-source-code.active-menu {
597597
max-height: 100vh;
598598
}
599599

600+
main pre.ruby::before {
601+
content: "Example";
602+
color: var(--secondary-color);
603+
border-bottom: 1px solid var(--border-color);
604+
display: block;
605+
padding: 10px 0;
606+
font-size: 0.9em;
607+
margin-bottom: 10px;
608+
}
609+
610+
main pre.ruby {
611+
margin: 0;
612+
padding: 0px 16px 16px 16px;
613+
overflow-x: auto;
614+
border-radius: 4px;
615+
border-color: var(--border-color);
616+
}
617+
600618
main .method-description .method-calls-super {
601619
color: var(--text-color);
602620
font-weight: bold;

0 commit comments

Comments
 (0)