For now, I'm trying to keep the core features lean and minimal - this seems to be something that can be easily handled via CSS as you've done. I'm also trying to maintain compatibility with the original Reveal.js code syntax highlighting so I'll punt on this for now. Thanks for the snippet though - I might add a link to it in the extras page on the documentation for others' reference.
SInce [Reveal.js v3.8.0](https://github.com/hakimel/reveal.js/releases/tag/3.8.0) has added support for line numbers, this might be something for me to reconsider. Not sure what approach to take though: [Prism](https://github.com/PrismJS/prism/blob/master/plugins/line-numbers/prism-line-numbers.js) also uses CSS to implement this, while [the solution incorporated in Reveal.js’ highlight plugin](https://github.com/wcoder/highlightjs-line-numbers.js) generates a table.