nature-of-code / noc-book

The Nature of Code book (archived repo, see README for new repo / build system!)

Home Page:http://natureofcode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deal with codesplit offset for long lines

shiffman opened this issue · comments

Some lines of code are too long to fit the comment to the right. I currently have an offset class in _codesplit.scss but it's not elegant. The original idea was to have two offsets: offset-up and offset-down. They looked like this in the first edition:

screen shot 2016-07-06 at 10 38 33 am

screen shot 2016-07-06 at 10 38 39 am

But I'm open to alternate designs / solutions.

The .offset class now by default will be shown below the code line and there's now an extra class (.offset-top) which will put the comment above the code.