I was trying to change the popup and phantom styles (font-size, font-family and background-color) for the new Emmet plugin. I opened an issue asking to the author and Sergey added an option to overwrite styles directly in the emmet settings. With this option you can’t change the font-family and if you change your color-scheme you need to change that setting to match your new cs.
Sergey review and said he was following the recommendations from the documentation:
Plugins that use minihtml are encouraged to set a unique
id
attribute on the<body>
tag of generated HTML to allow color schemes to override default plugin styles.
I tried changes in my color scheme but I was able to change only background-color of the popup not the phantom.(font-family didn’t work)
According to this you require escapes. It is correct? because I have tried with escapes and without and it doesn’t works.
I have the following content in my .sublime-color-scheme file
"globals":
{
"popup_css": "#emmet-preview-popup {background-color:color(var(--background));font-size:28px;font-family:Operator Mono Book}",
// "popup_css": "#emmet-preview-popup .markup-preview{background-color:color(var(--background));font-size:28px;font-family:Operator Mono Book}",
"phantom_css": "#emmet-preview-phantom{background-color:color(var(--background));font-size:28px;font-family:\"Operator Mono Book\"}",
},
With this settings:
- the font-size of the phantom changes but the font-size of the popup doesn’t.
- the background-color of the popup changes but the background-color of the popup doesn’t.
- the font-family doesn’t change in neither case. I have tried with and without escapes for the font-family and with other monospaced fonts
I think this is the file of the emmet plugin that have the css styles (lines 561…594)
Thanks for your help