atom / highlights

Syntax highlighter
https://atom.github.io/highlights
MIT License
530 stars 54 forks source link

Why <div> and not <ol> #17

Open codepo8 opened 9 years ago

codepo8 commented 9 years ago

That would give us line numbering for free.

kevinsawicki commented 9 years ago

<div> was used originally to match Atom's HTML structure since it was important to allow themes to work there without changes. And since Atom has a separate gutter component, <div> is used there for all lines.

codepo8 commented 9 years ago

Ah OK, that makes sense. Well, no, but it is a good reason :)

On Mon, Feb 9, 2015 at 6:07 PM, Kevin Sawicki notifications@github.com wrote:

was used originally to match Atom's HTML structure since it was important to allow themes to work there without changes. And since Atom has a separate gutter component,
is used there for all lines. — Reply to this email directly or view it on GitHub https://github.com/atom/highlights/issues/17#issuecomment-73558117.
kevinsawicki commented 9 years ago

Yeah, I'd be totally up for making this an option and having some sort of line number option available in this library.

codepo8 commented 9 years ago

well, you can do a CSS counter on the DIV element and generate the numbers with CSS. http://christianheilmann.com/2014/11/19/simple-things-styling-ordered-lists/

On Mon, Feb 9, 2015 at 6:59 PM, Kevin Sawicki notifications@github.com wrote:

Yeah, I'd be totally up for making this an option and having some sort of line number option available in this library.

— Reply to this email directly or view it on GitHub https://github.com/atom/highlights/issues/17#issuecomment-73567627.