ic-design-system icon indicating copy to clipboard operation
ic-design-system copied to clipboard

Update scroll bars on website code examples to always use light mode colours

Open GCHQ-Developer-847 opened this issue 7 months ago • 5 comments

Summary

Scroll bars on the code examples (when viewing the website in light mode) are not easy to see against their dark background so should be forced to be the light-coloured version.

E.g. see the React tab on this dialog code example

💰 Use value

Makes the scroll bars easier to see

Additional info

Might be worth looking at the change which was done for mi6/ic-ui-kit#2869.

Make sure both the Component pages Code Previews are updated and the ones on Testing pages

GCHQ-Developer-847 avatar Jun 10 '25 11:06 GCHQ-Developer-847

A link to an example would be good for a new contributor to check out 😊

evenstensberg avatar Jun 10 '25 20:06 evenstensberg

A link to an example would be good for a new contributor to check out 😊

Sorry, good idea - updated the ticket. The scroll bars were a recent addition so they're only on the develop branch, until the next release

GCHQ-Developer-847 avatar Jun 11 '25 10:06 GCHQ-Developer-847

Hi @GCHQ-Developer-847 , I'm Tabe Joel from Cameroon, and I'd love to take on this scrollbar visibility issue! I'm a frontend and mobile developer with extensive experience in CSS styling, accessibility compliance, cross-browser compatibility, and component library maintenance. To fix this, I'll:

Analyze the existing pattern from mi6/ic-ui-kit#2869 to maintain consistency Implement theme-aware CSS that forces light scrollbars in light mode for code examples Target both Component and Testing pages to ensure complete coverage Use proper CSS properties like scrollbar-color and ::-webkit-scrollbar for cross-browser support Test accessibility contrast ratios to meet WCAG standards Validate across all major browsers (Chrome, Firefox, Safari, Edge)

The solution will be clean, maintainable, and follow established patterns in the codebase. ETA: 47 hours Telegram: @Joeltabe2

Joeltabe avatar Aug 03 '25 17:08 Joeltabe

@Joeltabe, feel free to pick this ticket up if you would like to!

GCHQ-Developer-847 avatar Aug 04 '25 10:08 GCHQ-Developer-847

Seems to be an issue exclusively on Mac devices when using the setting to only show scrollbars when scrolling, due to using a dark scroll bar on light mode which blends into the black background of the code example.

Image Image

jd3267 avatar Sep 04 '25 10:09 jd3267