damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 414 forks source link

Hyperlink color always gray #571

Closed mikkolad closed 3 years ago

mikkolad commented 3 years ago

When viewing a hyperlink in slideshow it is always greyed out, regardless of whether or not the link has been visited before.

Outside of the slideshow the links all look correct. I've tried changing to themes with different colors for the links but they remain grey.

Not a major issue, but coloured links would be useful for a presentation.

damianavila commented 3 years ago

Thanks for the report @mikkolad, we will take a look!

parmentelat commented 3 years ago

Hi

That's reasonably easy to fix, but I have some reservations, mostly having to do with themes when playing with a fix for this issue, I realized it was kind of hard to decide what colours should be used if not always gray (of course as much as possible we want to avoid having to do changes for every reveal theme individually) right now this gray color has the good property of being reasonably friendly with all the reveal themes

plus, I've been using rise for quite a while and have never missed this one in practice, when I put a link in the slideshow at authoring time, then the chance for the link to be visited at showtime are very close to 1.0, aren't they ?

mikkolad commented 3 years ago

It's not a problem with links being visited or not. It's that links appear gray at all times rather than the standard blue which the theme suggests (that is the simple theme).

I assumed this was not intentional. If it is then I'll just have to live with it.

parmentelat commented 3 years ago

Oh I see; well if @damianavila agrees (as he is the one to have made that choice in the first place iirc), I believe that if you can take the time to find a single (blue-ish, iiuc) color that we could use for all links and that would be visually nice within all reveal themes, the change is really simple to implement

hth

mikkolad commented 3 years ago

I would love to know which lines in which file to simply change to adjust this on a local level! :) I tried some lines but didn't get a result.

I would probably use: HEX #2980B9
RGB 41, 128, 185
HSL 204, 78%, 44%

parmentelat commented 3 years ago

Hi

sources

I just played with this change; wrt the OP, one might also add a rule or the :visited pseudo-class if needed (I don't know much about less, I'm not sure about the &: so I replaced it with an a: which seems to work better)

--- a/classic/src/less/main.less
+++ b/classic/src/less/main.less
@@ -1,5 +1,7 @@
 @some-grey: #727272;
 @some-other-grey: #dfdfdf;
+@some-blue: #2980B9;
+@some-other-blue: #50a0ff;

 .transition-all {
   transition-property: all;
@@ -43,7 +45,7 @@
       p:first-child, p:last-child { display: inherit; }
     }

-    a { color: @some-grey; } &:hover { color: @some-grey; }
+    a { color: @some-blue; } a:hover { color: @some-other-blue; }

     .slides {
       .transition-all;

packaging

main.less is not packaged as such, it gets compiled into main.css

mikkolad commented 3 years ago

Thank you @parmentelat, did a build with those changes and it looks much nicer now. Looking forward to giving my presentation :)

Not sure if this should be closed here or not.

parmentelat commented 3 years ago

Not sure if this should be closed here or not.

well there is the option to open a PR ;-)

damianavila commented 3 years ago

IIRC, I chose that grey because I wanted to be close to the grey in the buttons (that already change, I think), so I would be OK with a PR as @parmentelat suggested.