language-stata icon indicating copy to clipboard operation
language-stata copied to clipboard

dnydoc, etc: RStudio-style different background colors

Open sikaiser opened this issue 6 years ago • 0 comments

This is not an issue but a tip / suggestion for something that could be added to the readme:

Personally I really like how in RStudio (when working with rmarkdown) the different blocks (code vs markdown) have different background colors. It helps a lot in recognizing the structure of the file I'm working on.

A similar effect can be achieved in Atom by adding something along the lines of the following code to your personal styles.less (in the /.atom directory). This example is for a file using stata-dyndoc-md and would give all the fenced code blocks the background color #373b41.

atom-text-editor {
	.line {
		position: relative;

		.syntax--fenced.syntax--code.syntax--md::before {
			background-color: #373b41;
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			content: '';
			display: block;
			z-index: -1;
		}
	}
}

sikaiser avatar Sep 15 '18 13:09 sikaiser