v1.6.0+wn22
Primer Spec is largely unchanged for the Winter 2022 semester, except for...
🪄 Enhanced Code Blocks!
Check out the demo for documentation and examples! https://eecs485staff.github.io/primer-spec/demo/enhanced-code-blocks.html
By default, Primer Spec will upgrade code blocks on the page:
| Before | After |
|---|---|
![]() |
![]() |
The new enhanced code blocks don't just look fancier.
-
Copy the entire code block to your clipboard using the copy-button in the top right corner.
Screen.Recording.2021-10-01.at.11.40.16.PM.mov
-
Select a single line of code by clicking the line number. You can even select multiple lines of code with a click + drag. (And if the line of code contains a console command, Primer Spec will only select the command itself!)
Screen.Recording.2021-10-01.at.11.37.43.PM.mov
-
Instructors can add a title to the code block using the
data-titleattribute.

-
Instructors can highlight specific lines in the code block using the
data-highlightattribute!

Many thanks to @awdeorio and @bellakiminsun for all of their feedback and contributions to the design of Enhanced Code Blocks 🙏

