Don't overlay the method's source over its docs in RDoc

pull/961/head
Jed Fox 7 years ago committed by Thibaut Courouble
parent efdd52a7c9
commit 62dcf2be4f

@ -33,17 +33,8 @@
}
}
.method-description { position: relative; }
.method-source-code {
display: none;
position: absolute;
z-index: 1;
top: 0;
left: -1em;
right: 0;
background: var(--contentBackground);
box-shadow: 0 1em 1em 1em var(--contentBackground);
> pre { margin: 0; }
}

@ -37,8 +37,10 @@ module Docs
end
# Add class to differentiate Ruby code from C code
css('.method-source-code > pre').each do |node|
node['class'] = node.at_css('.ruby-keyword') ? 'ruby' : 'c'
css('.method-source-code').each do |node|
node.parent.prepend_child(node)
pre = node.at_css('pre')
pre['class'] = pre.at_css('.ruby-keyword') ? 'ruby' : 'c'
end
# Remove code highlighting

Loading…
Cancel
Save