TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
62 stars 29 forks source link

"Return to top" button appears below code lines in dark mode #1699

Closed Masterjun3 closed 8 months ago

Masterjun3 commented 12 months ago

E.g. on https://tasvideos.org/LuaScripting/Display but happens in both wiki and forums. image

It is also hard to click it in this situation.

nattthebear commented 11 months ago

I'm not able to reproduce this:

image

Might it be only on a specific browser?

Masterjun3 commented 11 months ago

Only in Dark Mode!

nattthebear commented 11 months ago

Here's the culprit:

https://github.com/TASVideos/tasvideos/blob/main/TASVideos/wwwroot/css/partials/_prism-dark.scss#L268

I'm not sure why we're changing z-index in dark mode. Shouldn't the only difference between dark and light modes be the actual colors used?

Masterjun3 commented 11 months ago

Maybe for the line highlight? But I'm actually not seeing where we even use line-highlight. (Our diff uses different classes for the green and red lines) Maybe @TiKevin83 can explain the z-index or line-highlight?

TiKevin83 commented 11 months ago

I don't remember why those lines are there, I agree the z-index in theory shouldn't need to change between light and dark mode but maybe the behavior it's for is broken in light mode and it should just be in the base template? Also isn't .line-highlight.line-highlight redundant and the same as .line-highlight?

adelikat commented 11 months ago

Delete it and see what breaks? It's objectively wrong to be there

Masterjun3 commented 11 months ago

Oh looks like our dark theme is just copied from a preset theme: https://github.com/PrismJS/prism-themes/blob/447479fc7b2be2051fe27e561aceed7cc87a589f/themes/prism-vsc-dark-plus.css . Since we don't use line highlighting, at least not yet, we can just remove that block.

vadosnaprimer commented 8 months ago

I removed

https://github.com/TASVideos/tasvideos/blob/19077cbce60ac7d4f94b4323792ebe91b8b79174/TASVideos/wwwroot/css/partials/_prism-dark.scss#L263-L275

and it didn't help.

изображение

Masterjun3 commented 8 months ago

Have you used Ctrl+F5? Removing exactly those lines seems to work for me.

vadosnaprimer commented 8 months ago

Of course I forgot!