Title: Great for sharing CSS/HTML code snippets
Last modified: September 2, 2016

---

# Great for sharing CSS/HTML code snippets

 *  [Isaac Keyet](https://wordpress.org/support/users/isaackeyet/)
 * (@isaackeyet)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/)
 * Just installed this for my latest post where I had to show off more code than
   usual and it works just like expected. You can create new snippets and easily
   reference them in your posts using the shortcode listed in the Code Snippets 
   screen. Neat!
 * I only have two small nitpicks:
 * 1. There was some CSS bleed which caused the box to be way too high. It seems
   as if each line is always 18px tall but the line height is not enforced. I fixed
   it by adding line-height: 18px; to .ace_editor.
 * 2. Since I added the snippet through the Code Snippets editor I was first confused
   about how to actually reference the snippet in the post. Turns out _there is_
   a way to add/insert snippets from the editor, but it’s only visible in the Visual
   editor. Since you’re inserting content in my mind it would make more sense if
   it was simply a button right next to the Upload Media button above the editor
   altogether.
 * Great job!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Hugh Lashbrooke](https://wordpress.org/support/users/hlashbrooke/)
 * (@hlashbrooke)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760412)
 * Thanks Isaac!
 * To respond to your two points:
 * 1. This is something I have been trying to find a good work around for – the 
   line-height is different for each editor theme, so I can’t just specify 18px 
   globally. I am working to find a way to work out the height dynamically as the
   editor loads and I will release an update for this once I have it worked out.
 * 2. Thanks for the suggestion of the placement of the snippet button – I’ll look
   into that for the next release.
 * Would you mind posting a link to your site on here? It would be great to see 
   your use case for the plugin.
 *  Thread Starter [Isaac Keyet](https://wordpress.org/support/users/isaackeyet/)
 * (@isaackeyet)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760414)
 * I see, the line-height thing sounds gnarly. Since the font size _is_ declared
   though, it sounds like it would be semantic to just declare a line-height as 
   well. Otherwise if you don’t declare either and let the physical height of the
   elements be inherited from the parent elmenet’s line height in pixels that would
   probably be the best way to make sure it never breaks… I just used the default
   code style for now, might make it work better with the theme once I’ve launched
   a redesign. The post is [here](http://www.isaackeyet.com/2013/css3-vertical-device-drop-shadow/#code).
 *  Plugin Author [Hugh Lashbrooke](https://wordpress.org/support/users/hlashbrooke/)
 * (@hlashbrooke)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760415)
 * Awesome – thanks for the link! Very cool post BTW..
 * I’ll look more into the line-height issue in the coming weeks – I’ve had more
   pressing tasks to work on so I haven’t been focussing on this, but I agree that
   it could use some improvement.
 *  Thread Starter [Isaac Keyet](https://wordpress.org/support/users/isaackeyet/)
 * (@isaackeyet)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760426)
 * Keep up the good work and continue wooing the world 😉
 *  Plugin Author [Hugh Lashbrooke](https://wordpress.org/support/users/hlashbrooke/)
 * (@hlashbrooke)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760427)
 * Thanks Isaac 🙂
 *  [a515](https://wordpress.org/support/users/a515/)
 * (@a515)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760445)
 * Could you please add a download, copy button?
    [http://s.wordpress.org/extend/plugins/wp-syntax-download-extension/screenshot-1.png](http://s.wordpress.org/extend/plugins/wp-syntax-download-extension/screenshot-1.png)
   [http://wordpress.org/plugins/wp-syntax-download-extension/screenshots/](http://wordpress.org/plugins/wp-syntax-download-extension/screenshots/)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Great for sharing CSS/HTML code snippets’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/code-snippet-library_92e341.svg)
 * [Code Snippet Library](https://wordpress.org/plugins/code-snippet-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippet-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippet-library/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippet-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippet-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippet-library/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [a515](https://wordpress.org/support/users/a515/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/great-for-sharing-csshtml-code-snippets/#post-7760445)