Each line wrapped in a div?
See original GitHub issueWould it make sense to wrap each line in a div
? My use case is that I’ll be using this to highlight code coverage, so I’d like to have some lines with a different background color than other lines. I think this could also be useful for allowing people to highlight line ranges or click on the line number gutter to link to lines of code, like how GitHub does in source view.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
overflow-wrap | CSS-Tricks
The overflow-wrap property in CSS allows you to specify that the browser can break a line of text inside the targeted element onto...
Read more >Wrapping and breaking text - CSS: Cascading Style Sheets
This property will break a word once it is too long to fit on a line by itself. Note: The overflow-wrap property acts...
Read more >How to Wrap Words in a <div> Tag with CSS - W3docs
If you've faced the situation when you need to wrap words in a <div>, you can use the white-space property with the "pre-wrap"...
Read more >Is there a way to word-wrap long words in a div?
As david mentions, DIVs do wrap words by default. If you are referring to really long strings of text ...
Read more >Wrap with Abbreviation - Emmet Documentation
Wrap with Abbreviation. A very powerful tool of the Emmet toolkit. It takes an abbreviation, expands it and places currently selected content in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Quick example: http://www.webpackbin.com/E13xANNmM
@ben174 just published v 5.0.0 which enables this with a wrapLines prop, if using wrapLines can use a lineStyle prop as either object, or function that recives line number to style individual lines.
You can see an example here