neo4j-documentation / docs-ui

Mozilla Public License 2.0
4 stars 23 forks source link

Support for line highlighting in code blocks #206

Closed stefano-ottolenghi closed 9 months ago

stefano-ottolenghi commented 9 months ago

(Color comes from Needle, but cannot use the css color vars directly because they embed an opacity of 1, which we want to be 0.5)

netlify[bot] commented 9 months ago

Deploy Preview for neo4j-docs-ui ready!

Name Link
Latest commit e5b514eaf77967d34616f94605563f72376a2969
Latest deploy log https://app.netlify.com/sites/neo4j-docs-ui/deploys/65801b6180450800083ddd61
Deploy Preview https://deploy-preview-206--neo4j-docs-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

recrwplay commented 9 months ago

We'll need to make sure that with the highlight colors used for text in codeblocks, the background color choice passes WCAG AA (and ideally AAA).

This PR doesn't materially affect A11y status though, since we need to update the text highlight colors anyway.

If we want to merge this we should note that the colors will need to change later.

stefano-ottolenghi commented 9 months ago

Thanks for raising this. If colors will need to change anyway, let's merge this and keep it in mind for the future.

stefano-ottolenghi commented 6 months ago

There seems to be a glitch where sometimes the // mark-line is not parsed and is displayed as-is. I suspect a bug in highlight.js, possibly this one https://github.com/highlightjs/highlight.js/commit/970a4d33e6a850768c57a4b5ea4b667b3c8cbf11 , which is unfortunately only fixed in v11.