From 720765ea63268e133eb7bbfed4434685b6c3f7af Mon Sep 17 00:00:00 2001 From: Rafael Kraut <14234815+RafaelKr@users.noreply.github.com> Date: Wed, 25 Oct 2023 08:58:44 +0200 Subject: [PATCH 1/3] Add opacity to ferris when hovering the code block fixes #2893 --- ferris.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ferris.css b/ferris.css index fb4a553ffb..4d2097dc0d 100644 --- a/ferris.css +++ b/ferris.css @@ -24,6 +24,16 @@ body.ayu .not_desired_behavior { z-index: 99; right: 5px; top: 30px; + opacity: 1; + transition: opacity 0.1s; +} + +pre:hover .ferris-container { + opacity: 0.15; +} + +pre:hover .ferris-container:hover { + opacity: 1; } .ferris { From c7749a9138a761d04ee9cd7422fe29c9f83a0983 Mon Sep 17 00:00:00 2001 From: Rafael Kraut <14234815+RafaelKr@users.noreply.github.com> Date: Wed, 25 Oct 2023 10:00:09 +0200 Subject: [PATCH 2/3] Add note to Ferris introduction about hover opacity behavior --- src/ch00-00-introduction.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ch00-00-introduction.md b/src/ch00-00-introduction.md index 536988cb19..8dc900e015 100644 --- a/src/ch00-00-introduction.md +++ b/src/ch00-00-introduction.md @@ -185,6 +185,10 @@ error. Ferris will also help you distinguish code that isn’t meant to work: In most situations, we’ll lead you to the correct version of any code that doesn’t compile. +> Note: If Ferris gets in your way by overlaying the code, you can hover on the +> code block to make Ferris a little transparent. On mobile devices just click +> on the code block. + ## Source Code The source files from which this book is generated can be found on From 9e5348b92b04002a94ee8b9c25d35c2e95cab742 Mon Sep 17 00:00:00 2001 From: Rafael Kraut <14234815+RafaelKr@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:28:48 +0100 Subject: [PATCH 3/3] Make note about Ferris opacity more explicit Touchscreen better describes what we actually mean. This also aligns it with the note in ch04-02-references-and-borrowing ("You can hover your mouse over the circles (or tap on a touchscreen)...") --- src/ch00-00-introduction.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ch00-00-introduction.md b/src/ch00-00-introduction.md index 8dc900e015..6c7e5f19af 100644 --- a/src/ch00-00-introduction.md +++ b/src/ch00-00-introduction.md @@ -185,9 +185,9 @@ error. Ferris will also help you distinguish code that isn’t meant to work: In most situations, we’ll lead you to the correct version of any code that doesn’t compile. -> Note: If Ferris gets in your way by overlaying the code, you can hover on the -> code block to make Ferris a little transparent. On mobile devices just click -> on the code block. +> Note: If Ferris gets in your way by overlaying the code, you can hover your +> mouse on the code block to make Ferris a little transparent. On touchscreen +> devices just tap on the code block. ## Source Code