Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Customizer duplication bug #749

Open
syntaxerror opened this issue Feb 8, 2018 · 1 comment
Open

Customizer duplication bug #749

syntaxerror opened this issue Feb 8, 2018 · 1 comment
Labels

Comments

@syntaxerror
Copy link
Contributor

When using a customizer.json with basic settings, meaning body background-color and color, those values are saved twice in customizer.css

T.ex. this basic customizer.json:

{
    "general": {
        "title": "text_general_title",
        "description": "text_general_description",
        "control": {
            "sitename": {
                "selector": "#logo a"
            }
        }
    },
    "colors": {
        "title": "text_colors_title",
        "description": "text_colors_description",
        "control": {
            "container_background-color": {
                    "type": "color",
                    "label": "text_colors_container_background_label",
                    "default": "#bdc3c7",
                    "selector": "body"
            },
            "container-color_color": {
                    "type": "color",
                    "label": "text_colors_container_color_label",
                    "default": "#666666",
                    "selector": "body"
            }
        }
    },
    "images": {
        "title": "text_images_title",
        "description": "text_images_description",
        "control": {
            "logo": {
                "selector": "#logo a img"
            }
        }
    }
}

When saving in Customizer, it will generate this customizer.css:

body { 
 	font-family : inherit; 
 } 

 body { 
 	width : 100%; 
 } 

 body { 
 	background-color : #bdc3c7; 
 } 

 body { 
 	background-color : #bdc3c7; 
 } 

 body { 
 	color : #666666; 
 } 

 body { 
 	color : #666666; 
 }

This you should be able to confirm by saving Second theme in Customizer.

The problem is most likely because those are loaded by the controller in the getCustomizerItem function:
https://github.com/arastta/arastta/blob/master/admin/controller/appearance/customizer.php#L161-L207

## Another issue in this is the body font being sett to inherited, witch is giving us display issues on t.ex. a Mac.

If you save Second in Customizer, without selecting a system or Google font, it will be sett to 'inherit' and giving display issues. It overrides this: https://github.com/arastta/arastta/blob/master/catalog/view/theme/second/stylesheet/stylesheet.css#L2

Also, in Second, Arastta Core, you get duplicates:
skjermdump fra 2018-01-20 19-38-11

There shouldn't be those defaults in core, as designers should have the freedom to add what they prefer: https://github.com/arastta/arastta/blob/master/admin/controller/appearance/customizer.php#L161-L207

@denisdulici
Copy link
Member

Can confirm this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants