Change page background colour when grammar changes


#1

Good day,

Is it possible to change the background colour of the editor to suit the grammar displayed there? A mixin idea might look something like below -


@import "syntax-variables";

.theme() when (data-grammar = "text.md") {
        background-color: black
}

.theme() when (default()) {
	background-color: @syntax-background-color
}

atom-text-editor {
	.theme()
}

The data-grammar = "text.md" is the portion that needs something - in my opinion.

In advance my thanks.