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

Add GDS styling for code snippets #557

Open
daniel-ac-martin opened this issue Jul 12, 2022 · 3 comments
Open

Add GDS styling for code snippets #557

daniel-ac-martin opened this issue Jul 12, 2022 · 3 comments

Comments

@daniel-ac-martin
Copy link
Owner

See: https://govuk-prototype-kit.herokuapp.com/docs/install/install-the-kit.md

@daniel-ac-martin
Copy link
Owner Author

(Thanks to @tomyems for the suggestion.)

@tomyems
Copy link

tomyems commented Sep 5, 2022

Would code snippets be 'components-internal' rather than 'components'? I guess it depends on whether applications are likely to use code snippets in production?

There are two styles to code snippets in the GOV.UK prototype. One is inline in red, and the other is in a scrollable block. Should they be one component, with an attribute that toggles between inline or block, or are they two separate components? (I'd have guessed that they're doing the same function so in one component?)

@daniel-ac-martin
Copy link
Owner Author

I think, for now, just some default styling on <pre> and <code> blocks would go a long way. I'm not exactly sure where that should live or whether it needs to be a component.

Then again, I've already got some stuff for the preview boxes on the documentation pages, so perhaps I could just generalise that...
(Might be nice as there's some support for syntax highlighting.)

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

No branches or pull requests

2 participants