plfa / plfa.github.io

An introduction to programming language theory in Agda
https://plfa.github.io
Creative Commons Attribution 4.0 International
1.36k stars 307 forks source link

Prevent color change of visited definitions in code blocks #990

Open adql opened 5 months ago

adql commented 5 months ago

Add a a:visited rule to web/sass/theme/agda{-dark}.scss files to override the general rule inside .Agda elements. Closes #989.

wenkokke commented 5 months ago

You're setting the text color to transparent? Could you explain how that works and why it solves the issue? My guess would be to just set the color to inherit for visited.

adql commented 5 months ago

Apparently transparent only works in Firefox (sigh) and it's indeed too much of a hack. But anyway the real issue is with specificity and there's no need to add an overriding a:visited rule.

wenkokke commented 5 months ago

Does the latest commit address the issue? I'd expect to see at least a modification to the base Sass to exclude .Agda.

adql commented 5 months ago

The latest commit addresses the issue on both Firefox and Chromium. .Agda .{classname} has specificity weight 0-2-0, while a:visited has 0-1-1. I can have a look on using an exclusion rule instead, but as I pointed out in the corresponding issue this is how the original Agda html backend styles the code blocks.