Skip to content

v1.6.0+wn22

Choose a tag to compare

@seshrs seshrs released this 18 Dec 21:31
· 318 commits to main since this release
19ab2b9

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
Code blocks before (legacy) Code blocks after (enhanced)

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-title attribute.
    Enhanced code block with title

  • Instructors can highlight specific lines in the code block using the data-highlight attribute!
    image

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