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

Fix regression of code links being blue #336

Merged
merged 1 commit into from
May 17, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

Closes #335.

I git bisected this to #292. Before, we weren't actually fully running theme.js because JavaScript errors prevented the file from fully executing. @coruscating identified that before the regression, the HTML elements did not have the class .has-code, but after they did. I suspect theme.js is responsible for that (but I couldn't figure out how!)

Either way, these rules about .has-code are bad. We should not be setting links to be blue.

Copy link
Collaborator

@coruscating coruscating left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build looks good now, thanks for the fast fix!

@Eric-Arellano Eric-Arellano merged commit aaeab03 into Qiskit:main May 17, 2023
@Eric-Arellano Eric-Arellano deleted the fix-blue-code-links branch May 17, 2023 19:24
Eric-Arellano added a commit to Eric-Arellano/qiskit_sphinx_theme that referenced this pull request May 17, 2023
Closes Qiskit#335.

I git bisected this to
Qiskit#292. Before, we
weren't actually fully running `theme.js` because JavaScript errors
prevented the file from fully executing. @coruscating identified that
before the regression, the HTML elements did not have the class
`.has-code`, but after they did. I suspect `theme.js` is responsible for
that (but I couldn't figure out how!)

Either way, these rules about `.has-code` are bad. We should not be
setting links to be blue.
HuangJunye pushed a commit that referenced this pull request May 18, 2023
Closes #335.

I git bisected this to
#292. Before, we
weren't actually fully running `theme.js` because JavaScript errors
prevented the file from fully executing. @coruscating identified that
before the regression, the HTML elements did not have the class
`.has-code`, but after they did. I suspect `theme.js` is responsible for
that (but I couldn't figure out how!)

Either way, these rules about `.has-code` are bad. We should not be
setting links to be blue.
@javabster
Copy link
Collaborator

sorry I didn't jump on this sooner but just wanted to add some context. For web accessibility there is a lot of debate around the best way to style hyperlinks. I think previously it was considered best practice to ensure all hyperlinks are underlined and specifically blue in colour for unvisited links and purple for visited. This could explain why older versions of this codebase manually changed the link colours like that. I think more recently this best practice has been relaxed a bit (i think partly because web tech has become more creative and design-led) and the latest WCAG guidance just specifies that the colour needs to be a specific contrast ratio, and different colours for hover/visited links are optional: https://www.w3.org/TR/2016/NOTE-UNDERSTANDING-WCAG20-20161007/understanding-techniques.html

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.

Some links became blue in 1.12.0rc1
3 participants