plfa.github.io icon indicating copy to clipboard operation
plfa.github.io copied to clipboard

Prevent color change of visited definitions in code blocks

Open adql opened this issue 1 year ago • 4 comments

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

adql avatar May 03 '24 06:05 adql

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.

wenkokke avatar May 03 '24 11:05 wenkokke

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.

adql avatar May 03 '24 15:05 adql

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

wenkokke avatar May 04 '24 19:05 wenkokke

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.

adql avatar May 04 '24 19:05 adql