Skip to content

Add styling rules for good code examples in shared stylesheet #923

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

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

zetafunction
Copy link
Contributor

This change primarily affects the C++ style guide: while a number of other style guides also use <pre> directly for code examples, the other style guides all use JS to prettyprint the code blocks, and the prettyprinter overrides the styles specified in the shared stylesheet.

The exception is the AngularJS style guide, but it is already inconsistently formatted and this change does not make it any worse.

There are also several other style guides other than C++ where good/neutral are rendered identically; this commit does not attempt to address those either.

I copied the CSS rules from the internal C++ style guide. I did not attempt to make everything consistent; just the rules for <pre> and badcode/goodcode.

As far as I can tell:

This change primarily affects the C++ style guide: while a number of
other style guides also use <pre> directly for code examples, the other
style guides all use JS to prettyprint the code blocks, and the
prettyprinter overrides the styles specified in the shared stylesheet.

The exception is the AngularJS style guide, but it is already
inconsistently formatted and this change does not make it any worse.

There are also several other style guides other than C++ where
good/neutral are rendered identically; this commit does not attempt to
address those either.
@zetafunction
Copy link
Contributor Author

@geoffromer here's an attempt to resolve the good vs neutral styling

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.

1 participant