Bug #3186
closedCustom User CSS - Unsupported
0%
Description
Hi,
As I was building murphyinstituteblog.org, I had trouble with the Custom User CSS plug-in that appears to come default with CUNY Academic Commons sites. Some of my CSS wasn't rendering properly, or at all. I moved over to the JetPack Edit CSS tool and it worked just fine. I'm using a twenty fourteen theme.
Custom User CSS appears to be unsupported at this point. It might be worth changing the default CSS plug-in to something more current.
Thanks,
Leah
Updated by Matt Gold over 10 years ago
- Category name set to WordPress Plugins
- Status changed from New to Assigned
- Assignee set to Boone Gorges
Updated by Boone Gorges over 10 years ago
- Status changed from Assigned to Reporter Feedback
- Target version set to 1.6.3
- Estimated time set to 3.00 h
Leah - Thanks so much for reporting this.
This is going to be a hard problem to solve. I was planning on at least hiding the plugin for new users, but it turns out that we have (and have long had) the plugin network activated, which means there are no "new users". I can't network deactivate it without being able to activate it on the blogs where it's needed; but to know that I need to find some way of reliably determining who's currently using it. Add to this the fact that Jetpack's CSS tools don't necessarily work without connecting to wordpress.com - which makes me very reluctant to rely on it as the sole alternative - and we have sort of a complex issue.
It might be that, in the short term, the easist fix is to fix the plugin and maintain our own fork. Leah, if you get a few moments, would you mind elaborating a bit on the changes you attempted to make, and the ways in which they didn't seem to show up? If I could reproduce the issues locally, I might find that a fix for the plugin is fairly straightforward.
Updated by Leah Feder over 10 years ago
Hi Boone,
I was trying to change the menu colors. Below is the CSS that wasn't working at all. (The first bit might have worked; I don't remember. Anything that included ">" definitely failed to render.)
/*submenu items*/
.primary-navigation ul ul {
background-color: #212596;
}
.primary-navigation li:hover > a,
.primary-navigation li.focus > a {
background-color: #212596;
}
.primary-navigation ul ul a:hover,
.primary-navigation ul ul li.focus > a {
background-color: #434acc;
}
.site-navigation .current_page_item > a,
.site-navigation .current_page_ancestor > a,
.site-navigation .current-menu-item > a,
.site-navigation .current-menu-ancestor > a {
color: #fff;
}
::selection {
background: #ee800d;
}
::-moz-selection {
background: #ee800d;
}
Also, some other CSS was getting funky. Every time I saved CSS that looked like this or some variant thereof:
button:active,
.contributor-posts-link:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active {
background-color: #ee800d;
}
...slashes would be added beside the quotation marks. Each click of the save button, new slashes. That quickly added up and made the CSS really messy and unwieldy.
Please let me know if there's anything else I can do to help. Thanks so much!
Leah
Updated by Boone Gorges over 10 years ago
- Target version changed from 1.6.3 to 1.6.4
Thanks, Leah - Time got away from me this time around, so I'm going to try to look at this for the next release.
Updated by Boone Gorges over 10 years ago
- Target version changed from 1.6.4 to 1.6.5
Updated by Boone Gorges over 10 years ago
- Status changed from Reporter Feedback to Resolved
Leah, thanks for your patience as I sort this out. After some research, I ended up rewriting much of the plugin logic, and going with a separate sanitization library (the same one used in Jetpack, in fact). This means that selectors like the ones you're trying to use here will now work, and we here at the Commons won't have to go through the process of migrating everyone away from this otherwise working plugin.
Relevant changeset (in our private repo, sorry) is https://github.com/castiron/cac/commit/9245edfb98685d3680359a1116f7252480c5e106
After the 1.6.5 release, scheduled for June 1, I'll update this ticket to let you know that the changes have been deployed and are available for testing. At that time, you'll need to resave a clean copy of your custom CSS, at which point it should be properly sanitized and ought to work correctly. Until then, I'm marking this ticket resolved.
Updated by Boone Gorges over 10 years ago
The release is live and the changes are ready to be tested. Thanks for your patience and help.