Skip to content

Commit

Permalink
[DOC] Improve CSS for "toggle source" hovering over one more method s…
Browse files Browse the repository at this point in the history
…ignatures

This commit improves the behavior of showing the "toggle source" element on mouseover.

For example, when a method has one more signatures by using `:call-seq:`,

```ruby
# :call-seq:
#   foo {|element| ... } -> self
#   foo -> new_enumeration
def foo
end
```

The current CSS doesn't show "toggle source" even when hovering the second signature `foo -> new_enumeration`.
But this change will show "toggle source" always when hovering over any signature.

For details about the `.method-header` element, see `lib/rdoc/generator/template/darkfish/class.rhtml`:
https://github.com/ruby/rdoc/blob/0e060c69f51ec4a877e5cde69b31d47eaeb2a2b9/lib/rdoc/generator/template/darkfish/class.rhtml#L101-L124

For example, see https://docs.ruby-lang.org/en/3.2/Array.html#method-i-delete
  • Loading branch information
ybiquitous authored Jul 5, 2023
1 parent b93687f commit e8f22ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/generator/template/darkfish/css/rdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ main .method-click-advice {
line-height: 20px;
background: url(../images/zoom.png) no-repeat right top;
}
main .method-heading:hover .method-click-advice {
main .method-header:hover .method-click-advice {
visibility: visible;
}

Expand Down

0 comments on commit e8f22ce

Please sign in to comment.