-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple row ranges display different highlight colors #2379
Comments
Right now, Line highlight can be used to highlight specific lines but it cannot light them in different colors. That being said: Red and green? This is just a guess but are you trying to highlight a diff? If so, then you can use Difff Highlight. |
How to specify which lines are highlighted with what color? Is there a complete example? It's just part of the official website |
Difff Highlight is intended for diffs (e.g. git diffs you can also see on Github). This was just a guess of mine that this might have been what you wanted to do. It's not possible to specify a specific color (or similar) for a specific line with Line Highlight. Maybe you could use Keep Markup to mark some text instead (you can set the color via CSS)? |
I just raised #2389 which is a PR for a new plugin that makes it possible to control lines via CSS, so, maybe, this is something that could help with the original question? using Lines one should be able to achieve what's requested with CSS looking as follows: pre div.lines:nth-of-type(n+1):nth-of-type(-n+3) {
background: red;
}
pre div.lines:nth-of-type(n+4):nth-of-type(-n+9) {
background: green;
} |
I went to the official website to see the demo. I don't understand how does it distinguish different code blocks |
@galaxy4public Where can the plug-in you mentioned set the color difference between different code blocks |
The plugin does not do any styling, it enables you to use CSS styling, so you can use CSS selectors to choose where to apply styles. For example, you can assign different |
I would like to use something like that for displaying some test coverage. |
Motivation
Please explain the problem you're having/why you propose this feature. Ex. I'm always frustrated when [...]
Description
A clear and concise description of what you want to happen.
For example, it is required that lines 1-3 are highlighted red and lines 4-9 are highlighted green. What should I do???
Alternatives
A clear and concise description of any alternative solutions or features you've considered, if applicable.
The text was updated successfully, but these errors were encountered: