Site logo

Archived topic

theme.json makes editor left aligned

3 replies · Started by Neil on November 9, 2021

Viewing posts 1–4 of 4

I am trying to create a custom color palette for a client but when I add the theme.json file it throws the editor to the left.
If I remove the json file the editor goes back to it's normal centrally aligned position.

Screenshot of error

The code that I have is:


{
    "version": 1,
    "settings": {
        "color": {
            "palette": [
                {
                    "name": "Purple Main",
                    "slug": "purple-main",
                    "color": "#993393"
                },
                {
                    "name": "Purple 50 Main",
                    "slug": "purple-fifty-percent",
                    "color": "#c192c2"
                },
		{
                    "name": "Green Main",
                    "slug": "green-main",
                    "color": "#a2ad00"
                },
		{
                    "name": "Pink",
                    "slug": "pink",
                    "color": "#cf83cc"
                },
		{
                    "name": "Pink Dark",
                    "slug": "pink-darker",
                    "color": "#af52ab"
                },
		{
                    "name": "Purple Dark",
                    "slug": "purple-dark",
                    "color": "#8d1888"
                },
		{
                    "name": "Purple Darkest",
                    "slug": "purple-darkest",
                    "color": "#6d0b68"
                },
		{
                    "name": "Green Light",
                    "slug": "green-light",
                    "color": "#c6d20f"
                },
		{
                    "name": "Green Dark",
                    "slug": "green-dark",
                    "color": "#828b00"
                },
		{
                    "name": "White",
                    "slug": "white",
                    "color": "#ffffff"
                },
        {
                    "name": "Dark Grey",
                    "slug": "dark-grey",
                    "color": "#555555"
                },
		{
                    "name": "Black",
                    "slug": "black",
                    "color": "#000000"
                }
            ]
        }
    }
}

It seems to be to WP standards and is valid json. Any ideas?
Happy to supply access details if needed.

@leo That's awesome and looks just like I was trying to achieve. Didn't even know it was there.

Thanks for your help.

This archived topic is closed to new replies.