Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent color change of visited definitions in code blocks #990

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

adql
Copy link
Contributor

@adql adql commented May 3, 2024

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

@wenkokke
Copy link
Collaborator

wenkokke commented May 3, 2024

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
Copy link
Contributor Author

adql commented May 3, 2024

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
Copy link
Collaborator

wenkokke commented May 4, 2024

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

@adql
Copy link
Contributor Author

adql commented May 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a:visited in code blocks messes up highlighting
2 participants