ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Text styling for inline code and keyboard references

Open ASM995 opened this issue 3 years ago • 1 comments

What is the purpose of the enhancement?

Previous microsite showed code with an outline box and different font. Keyboard keys should be presented differently to code, and we can explore simple formatting such as bold, italics, 'quotes' etc to highlight the key.

Why do we need it?

In the new microsite, we need to define how we display code and keyboard keys when referenced in body text.

Tasks:  * New styles to be added to Figma for this.  * Guidance guidance updated to define how these are referenced in the word docs.  * A11y checked to ensure contrasts if introducing backgrounds.  * Syntax styling?

Keyboard keys should be presented differently to code, and we can explore simple formatting such as bold, italics, 'quotes' etc to highlight the key.

Given that a piece of documentation references a keypress (such as space, enter or arrow keys)

When displayed inline in a body of text

Then it should use the keypress styling.

Given that a piece of documentation references some code (such as a classname, a prop, or a token)

When displayed inline in a body of text

Then it should use the code-reference styling.

ASM995 avatar Jul 27 '22 11:07 ASM995

Need to review all guidance pages to create a list of areas that requires these styling classes. @DBD324

ASM995 avatar Jan 12 '23 11:01 ASM995

No work needed for the code, just for the keyboard press

MI6-255 avatar Jul 11 '24 09:07 MI6-255

As part of the ticket decide if we want a component only in Gatsby or it is a typography variant we use with backticks

MI6-255 avatar Jul 11 '24 09:07 MI6-255