Skip to content

Commit 8372e56

Browse files
committed
Ferris: always show Ferrises, even if small
Previously, when we incorporated Ferris into the container for the buttons, we were bringing along the visibility of the buttons even when it was important to know that the code wouldn’t compile. This changes that by showing and hiding the buttons themselves rather than their container. Fixes #4274
1 parent 9847e79 commit 8372e56

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ferris.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,25 @@ body.ayu .not_desired_behavior {
4343
.ferris-explain {
4444
width: 100px;
4545
}
46+
47+
/*
48+
A bit of a hack to make small Ferris use the existing buttons container but
49+
only show/hide the buttons on hover over the `pre`. Targeting `.listing`
50+
increases the specificity of this rule.
51+
*/
52+
pre > .buttons {
53+
visibility: visible;
54+
opacity: 1;
55+
transition: none;
56+
}
57+
58+
pre > .buttons button {
59+
visibility: hidden;
60+
opacity: 0;
61+
transition: visibility 0.1s linear, opacity 0.1s linear;
62+
}
63+
64+
pre:hover > .buttons button {
65+
visibility: visible;
66+
opacity: 1;
67+
}

0 commit comments

Comments
 (0)