Add custom CSS Is Losing Entries
I was modifying my theme and noticed something. I added custom CSS rules in the ”Add custom CSS” field. This worked fine, but when I came back to it that field was blank, and my CSS rules were gone. They were still in effect on the site. They were written in to the file.
I had been in the HTML before I found the Add CSS in the dropdown of advanced theme edit and had saved a changed theme with a couple of CSS changes added. I have since added a conditional body class rule down by the <body> tag, but this was happening before I did that. Today I added another custom CSS to that field. It seemed to stick, so I added all the other rules I had added to the HTML. They seemed to stick, so I checked the HTML and found them written there twice, once from when I had added them directly and once from the "Add custom CSS". So I removed the duplicates and then checked the "Add custom CSS" again. All the rules were gone.
So this means that the only way to modify those rules is to go into the HTML. New rules can still be added to "Add custom CSS".
This is using the Essential theme.
Comments
Post a Comment