Sublime Forum

Cannot get header to theme

#1

Hello
I’ve been trying to make some changes to the meetio-deepocean theme, and have been successful, except for the header class.

For some reason, I cannot get it to theme, even with the default meetio theme.
Screenshot:

"variables": {
    ...
    "headerBg": "#ff0077",
    ...
},
"rules":[
    ...
    {
        "class": "header",
        "layer0.tint": "var(headerBg)",
        "layer0.opacity": 1,
        "content_margin": [0,2,0,2]
    },
    ...
]

(As is visible from the screenshot, I have changed the active tab border and info-area button hover colors)

I did try checking if there is something overwriting this rule but this is the only rule that mentions header class directly. Also, it looks like the header is the same as that in the default merge theme (Breakers).

On inspecting it using the logTree setting, I see that layer0.tint always gets overwritten. I tried adding my colours in layer1 and setting it’s opacity to 1 - the layer1.tint did show up but with it’s opacity set to 0.

The classes with header as their parent (such as button-control and button-control-right) are themed correctly.

0 Likes

#2

please help, anyone?

it’s the sort of thing that’s frustrating enough to put you off, i would really appreciate any hints

0 Likes

#3

Well, creating a Packages/User/Merge Deepocean.sublime-merge-theme with following content is everything needed to change the header’s background on my end (Windows 11, SM 2095).

Using latest revision from master, cloned into Packages/Theme - Meetio

{
	"variables": {
		 "headerBg": "#ff0077",
	}
}

Such colorful changes might require some more tweaks though. Merge’s theme and Meetio are designed so most stuff should be tweakable by adjusting “variables”.

0 Likes

#4

Thanks!

I’ve only seen .sublime-theme files, even for merge themes, ST doesn’t seem to recognize .sublime-merge-theme in syntax - what’s up with that, is it just an alias?
As for the color, I just wanted to quickly spot whether it changed or not.

0 Likes

#5

It’s all just JSON, maybe not bound by default by neither default JSON syntax nor PackageDev, but that’s not of an issue as unknown extensions can always be bound manually.

SM started using .sublime-theme, but to make it clear those are not intendet for use by ST, a new extension (.sublime-merge-theme) was introduced, years ago. SM should accept both extensions.

I’d just guess extension of an overriding syntax in User package must match the original theme’s one.

0 Likes