Feature Proposal: Better theme customizations via custom CSS with live previews
When people ask “why WordPress?”, some of the most common answers center around flexibility for users of all kinds, whether they’re building their sites primarily through code or UI. Let’s take the story of a user who does a little of both – we’ll call her Becky.
Becky is a pretty savvy user. She knows that you’re supposed to make child themes instead of hacking on a theme directly, because updates can wipe out your changes. She found that out the hard way when she first started using WordPress – she hardly knew what CSS or PHP were, but she knew there was a theme editor in the admin and that she could make tweaks to colors or remove the author byline pretty easily without having to figure out this FTP stuff. Later on, most colors could be changed with the customizer so having a child theme just to remove an author byline seemed like overkill, but it was certainly better than having it reappear every time her site updated, especially with auto updates turned on.
After a couple years with the same theme on her personal site, Becky felt it was time to change things up. She was pleasantly surprised to find some new features that made getting a theme set up a lot easier, especially when live previewing them. Still, though, that pesky author byline remained, and since her last child theme copied a template to get rid of the byline, she would have to set up a whole new one to do it again. Then Becky found an “Edit CSS” option and realized she could hide things using CSS without having to go through the entire child theme process. Now, it turns out that those CSS tweaks didn’t come with live previewing, and that functionality was provided by a certain plugin, but Becky got what she needed to get done a lot faster than she would have otherwise, and ended up with the site she wanted.
This isn’t one specific story, but it is a combination of user stories many have heard, witnessed, or even personally experienced. You could replace Becky with @helen and it would be 100% accurate. The theme editor is a dangerous but useful entry point to more deeply customizing your site – rather than outright removing it and cutting off that introduction not just to WordPress code but to the concept of web development at large, why not provide a far safer and more user-friendly alternative? This post will explain why custom CSS with live previewing is valuable for WordPress and propose an implementation for inclusion in 4.7.
Proposed solution: Custom CSS with live preview
When bridging the gap between advanced user and beginning developer, desired changes are typically visual tweaks, such as changing a font size or hiding something, that are theme-specific. These sorts of changes should not require that users take risks editing live files that might white screen their sites or jump immediately into developer-facing tasks such as using FTP. Therefore, the scope of this feature has been defined as a custom CSS editor that leverages the customizer for a user-friendly live preview experience. This live preview allows for users to try various tweaks to a theme before saving and setting their changes live.
There are hundreds of thousands (if not millions) of users making use of custom CSS plugins or other themes/plugins that have custom CSS capabilities, and the frequent suggestion of CSS fixes in support forums justify a core need for this functionality. When plugins and themes interact in unexpected ways, CSS snippets are often an efficient solution to fixing the particular problem on particular sites.
The CSS editor takes inspiration from the many plugins offering similar solutions, but with an updated approach that offers instant live previewing in the customizer. The proposal for 4.7 looks like this:
Notably, previewing CSS in the customizer allows the site to be navigated and previewed on different sized devices by leveraging existing core features, allowing users to visualize the impact of their changes across their site. Error messages are shown for common syntax mistakes to help users ensure that their CSS is formatted properly before saving.
In future releases, the interface can be iterated on to further improve usability. The long-term design vision provides functionality such as revisions, syntax highlighting, and in-preview selector helpers, and can be implemented iteratively over time (click through for the full version):
CSS would be stored in a custom post type (without admin UI), with a post stored for each theme. The editor would be used to supplement and override theme styles rather than editing them directly, as users have long been advised that directly editing files may lead to lost changes during updates. Instead, custom CSS safely stays available through updating and switching themes, starting fresh for each new theme. Projects such as customize changesets (#30937) and revisions for customizer settings (#31089) would bring future enhancements to this feature and further leverage the opportunities that come with storing the data in post objects.
This is proposed as core functionality rather than remaining as plugin territory because it is designed as the first step toward a next generation of the existing theme editor in core, with a more refined feature set and safer, more user-oriented focus. The theme editor is not proposed to be removed at this time, though with the introduction of this feature it likely makes sense to introduce more friction before accessing the editor (#31779).
Documentation
To improve the user experience further, it is critical that a link to documentation and resources for learning CSS be included with useful help text. This could initially be the “CSS” codex page but would ideally live on a user or developer handbook of some sort eventually (perhaps the theme developer handbook?). This help text must be much more succinct than the help tab on the existing theme editor, conveying what CSS is, where to learn about specific rules, and explaining that it’s specific to each theme in only a few lines.
Help is needed to create a resource for using custom CSS in WordPress, and locate it on WordPress.org. There are some related resources on make/training and WordPress.com has a good introductory page that they may be willing to contribute. Translated versions will eventually be needed as well. If anyone is interested in improving this aspect of the feature, which will presumably live on WordPress.org, please comment on this post.
Security, Capabilities, and Multisite
While the proposal includes basic validation, it is not possible to fully sanitize CSS. For this reason, a new meta capability will be introduced for managing css, unfiltered_css. By default, this is mapped to the unfiltered_html capability.
Site administrators on multisite networks do not have the unfiltered_html capability by default. A plugin that remaps unfiltered_css to a different capability can be created to provide this access on multisite, where custom CSS is especially useful given the need to restrict the number of themes and child themes in the network. This is an area of potential evolution over time.
Related Customize API Improvements
There are a couple of customizer API improvements introduced as part of the implementation of custom CSS in the customizer. A new “Code Editor” customizer control (WP_Customize_Code_Editor_Control) is used for the CSS editor and can also be utilized in plugins and elsewhere in the future. It currently handles line numbers and basic code styling, and will eventually add enhancements such as syntax highlighting.
Additionally, the WP_Customize_Section class has a new “description_hidden” parameter, which locates the section description in the section header behind the help icon toggle (“?”), functioning in the same manner as the customizer panel descriptions.
Contributors
@johnregan3 is leading development of this project, based on initial work by myself (@celloexpressions). @folletto is leading design efforts, with a focus on the long-term growth of the feature for maximum usability.
The implementation takes inspiration from many of the numerous plugins and services that implement custom CSS, specifically including:
- Simple Custom CSS (@johnregan3)
- Modular Custom CSS (@celloexpressions)
- WordPress.com Custom CSS in the design upgrade (Automattic)
- Jetpack (Automattic)
Testing, Feedback, and Next Steps
Your help is needed in giving feedback on this proposal and testing the feature! To test, please apply the patch either via Trac or the PR (helpful reminder: grunt patch handles both) and try some custom CSS in the customizer using various themes.
Pending approval of this proposal, the next steps will be to finalize and commit the patch on #35395. Code review is ongoing in the GitHub PR linked on the ticket. Feedback on the feature in general and the specific implementation is encouraged via the comments on this post, with any more technical implementation discussion happening on the Trac ticket or GitHub PR.




FolioVision 5:46 pm on October 11, 2016 Permalink | Log in to Reply
I appreciate all the thought you’ve put into this Nick. A simpler way to customise a child theme is a bold and welcome proposal.
Still I’d rather see a tool for CSS customisation (a browser extension or an app) than add all this code to core WordPress. This much javascript and CSS in a single webpage is a house of cards and equally fragile.
A simple way to save in custom CSS after using an external tool would be useful.
PS. It pains me every day to see complex caching solutions and top heavy security plugins. Core issues (caching and security) would be a better place to start with heavy duty new features than adding more fragility and complexity to a an already fragile and complex system.
Helen Hou-Sandi 7:07 pm on October 11, 2016 Permalink | Log in to Reply
Volunteer effort is not symmetrical – people work on things they have expertise in and passion for. “X is suffering because you are working on Y” is a fallacy.
Nick Halsey 11:30 pm on October 11, 2016 Permalink | Log in to Reply
This feature doesn’t introduce a significant amount of code and in fact, most of the core code is PHP, not JS or CSS. Because it uses the customizer API, which is a framework for live-previewing changes to sites, the implementation of the particular feature is not complex. The proposed solution will work well in a workflow where you write CSS elsewhere and paste it in as well.
Jon Brown 6:33 pm on October 11, 2016 Permalink | Log in to Reply
The general outline of this proposal sounds good to me and I’d certainly love to see all the custom css plugins die a fiery death. The primary reason for that though is that I’ve seen them all hurt performance with slow queries on each page load. My mantra has long been that CSS doesn’t belong in the database.
I suspect storing the data in a CPT (instead of _options) is going to be more performant, but I’m still very considered about it based on past experience. Wouldn’t be possible to store it as a static file while still having a similar UI to this proposal for editing that file’s content?
Either way, is there a way it could be tied into the enqueuing system so it could be easily manipulated by themes and picked up by plugins that concatenate enqueued stylesheets?
Luke Cavanagh 8:11 pm on October 11, 2016 Permalink | Log in to Reply
Not sure what the performance will be like for rendering out CSS from postmeta.
Nick Halsey 11:27 pm on October 11, 2016 Permalink | Log in to Reply
Noting that it’ll use post objects directly, not postmeta. This is how Jetpack and WordPress.com do it, so I don’t believe there aren’t major performance issues with that, although I can’t speak to specifics there.
Luke Cavanagh 8:02 pm on October 12, 2016 Permalink | Log in to Reply
Okay makes sense to use post content. Again it might depend on how much custom CSS is being added.
Tom J Nowell 9:39 pm on October 11, 2016 Permalink | Log in to Reply
I’d just like to note that loading this post on a mobile is painful, I’m sure we can cut down a fullscreen 6MB GIF to perhaps a 640×480 view of a reduced size screen a quarter of the length, especially given that when roaming that GIF could cost a lot of money to load. I know my former carrier charges £6 per MB in the US and Canada, that’s £36 or $43 USD
vherring 10:09 pm on October 11, 2016 Permalink | Log in to Reply
The feed back here is from developers the real benefactors of this kind of change is not developers, it in some ways threatens developers because if we get sophisticated in this feature a significant proportion peoples frustration with themes would go away. Like others I do feel storing in a database is too heavy for the feature at present and maintaining a method similar to existing mechanisms provides the flexibility in using the feature in the short term. Perhaps migrating to a different permanent storage method in the future as we become familiar with it and it is functionality is extended.
simonrcodrington 10:54 pm on October 11, 2016 Permalink | Log in to Reply
Pretty excited by this. I think it’s a great idea to offer a more core centric solution to styles and the customizer is the perfect place for it. Having the ability to control styling in an easy to preview way will really help some of our more tech savvy users without giving me the stress of having to let them loose editing the child them.
In addition to helping site admins, I can see this being really useful as it gives me the ability to quickly preview style charges without affecting live sites.
Ahmad Awais 12:17 am on October 12, 2016 Permalink | Log in to Reply
Good one, Nick! +1 for Aditional CSS. I am just not so sure about the versioning part of it. While it is going to be an incredibly important part of this addition, at the same time it might confuse a beginner. What are your thoughts about that?
Nick Halsey 2:24 am on October 12, 2016 Permalink | Log in to Reply
Versioning/revisions isn’t part of the initial proposal for 4.7. We’ll explore all of the considerations there in a future release, and your input/any ideas you have for improving the usability would be appreciated there.
Ipstenu (Mika Epstein) 1:18 am on October 12, 2016 Permalink | Log in to Reply
One small thought… Sometimes users make changes that are not theme-specific. Like your example, Betty/Helen wanting to hide the author byline via CSS, if she changed from TwentyFifteen to the Magical Jumbotron theme, she should be able to grab the CSS from before. Otherwise she has to go back to her old theme and copy pasta.
Right now, JetPack lets you restore by clicking from your older, saved revisions so stealing that would help 🙂
Nick Halsey 2:22 am on October 12, 2016 Permalink | Log in to Reply
I explored this with the Modular Custom CSS plugin, which stores CSS intended for themes and plugins separately. In practice, I found that the vast majority of tweaks were specific to a particular theme since so much of the way the markup is structured depends on the theme. For the byline example, it would work on other themes using similar markup, but it’s hard to say how consistent themes would be there.
That being said, there is definitely room for core to improve the cross-theme experience here over time.
Ipstenu (Mika Epstein) 5:31 pm on October 13, 2016 Permalink | Log in to Reply
Yes but… consider that I may change my theme and keep my plugins. This may be intended to be theme specific, but (part of) the reason Jetpack CSS is so popular is that it’s outside my theme, so I can keep plugin css tweaks between themes 🙂
Knut Sparhell 1:33 am on October 14, 2016 Permalink | Log in to Reply
Does Jetpack really keep custom CSS between themes? It says in a notice at the top of the editor that the CSS will be reset when changing theme.
Ipstenu (Mika Epstein) 11:54 pm on October 14, 2016 Permalink
It does and it doesn’t. What it does is lets me click on the link to see the older versions, with the name of the theme. So I can go back and grab the old one. I’m not saying KEEP them as the active CSS, I’m saying make it easy for me to go back, get my old css, and restore it 🙂
IIRC it’s via post revisions, but I could be wrong (and I’m currently not using it because I needed SVG stuff they don’t support).
David C 1:34 am on October 12, 2016 Permalink | Log in to Reply
Fantastic idea and proof of concept, Nick! We get customers all the time asking how to “tweak” certain css elements without having to build a child theme. This feature would certainly fill that gap. BTW, nice animated gifs. What software did you use to create them?
Nick Halsey 2:27 am on October 12, 2016 Permalink | Log in to Reply
Thanks! It’s definitely a team effort. The screencast was made with a handy tool called licecap.
James Collins 2:20 am on October 12, 2016 Permalink | Log in to Reply
This is a great idea.
We always need to write custom css rules when creating WordPress sites for clients. We’ve used our own Custom CSS plugin for many years, which helps us avoid the need to create a child theme just to override some CSS.
We also have clients who want to tweak CSS rules themselves, so they appreciate being able to do so via the WordPress admin.
Having this operate via the customizer with live preview would be a real time saver!
In our custom CSS plugin, we save the CSS rules to the database, and also out to a .css file in wp-content/uploads/ , and reference that inside . So when the website is viewed, the .css file is loaded via a CSS link rather than being embedded directly in each and every page.
I would have thought serving the static .css file from the uploads directory would be more performant than embedding the CSS in each and every page?
We also use CodeMirror for the actual textarea/editor interface, which works well.
Kishores 5:14 am on October 12, 2016 Permalink | Log in to Reply
+1 for Aditional CSS.
Hapiuc Robert 6:34 am on October 12, 2016 Permalink | Log in to Reply
Really great idea, for small use of the feature storing the data in a CPT doesn’t sound so bad, but we all know how users act and things can escalade quickly.
How the CSS will be embedded on the page?
Primoz Cigler 6:36 am on October 12, 2016 Permalink | Log in to Reply
Excellent proposal Nick, I can see lots of positive feedback here and I can only add to it.
One question: will there be another blogpost here in Make Core going more in details about implementation? With the introduction of Additional CSS in 4.7 we will be deprecating our custom CSS field from customizer and we want do to do in a safely manner by automatically migrating the existing custom CSS for our users.
> How the CSS will be embedded on the page?
+1
Nick Halsey 2:04 pm on October 12, 2016 Permalink | Log in to Reply
That’s a good point, hopefully @johnregan3 can put together some boilerplate functionality for importing existing CSS data into the new core post type, and we can write a dev note for that during beta.
Hugo Ashmore 8:57 am on October 12, 2016 Permalink | Log in to Reply
While I appreciate the sentiments here in the proposal I also have great worries when WP attempts to pursue the user focussed simplicity path as we are in danger of going too far and of encouraging bad code and broken sites and where those users tweaking wouldn’t especially realise something was amiss.
CSS is not – as often it feels like it’s suggested – a simple language, yes it’s a simple declarative syntax but in reality a powerful tool for preparing the presentation of rendered code to devices, not simply a tool to make a link ‘green’, the cascade, the inheritance are hard aspects to grasp and the flow of rulesets important. CSS was never intended, really, to be worked as many separate disparate episodes provided by themes, child themes, plugins, core etc.. In many cases this results in sites that are problematic to say the least in maintaining with clashes in code that are largely unresolvable.
I understand the issue though and that we are talking from the perspective of non coder/developers but from a developers perspective we have to understand that many – if from a Standards focussed background – would have a deep concern with the level of participation a client might have in that core site code, personally if a client came to me and expressed the desire for a major site build but also that they would tweak and play with the code as they saw fit I would decline the work as impossible or hard to maintain any sort of standard. implementing a proposal like this may worry developers and further isolate them from the WP sphere at worst (yes the functionality doesn’t have to exist ).
The process for adding this custom CSS needs thought, embedding as often seen by plugins using wp_head is not a great idea filling the head element of a document isn’t good practise, never been so , embedded code isn’t cached as a linked file is, the page is weighed down, altogether not a good experience especially when perhaps many plugins drop their styles in. So preferably a method that somehow allows the writing of a file to be enqueued would be better although possibly with issues implementing.
Regardless I do appreciate the intent in this proposal and the nature of WP is to be user focussed and friendly, with ease of use but we just need to think carefully how we implement improvements such as this.
Joy 2:59 pm on October 12, 2016 Permalink | Log in to Reply
+100!
I agree that if you don’t really know CSS, you shouldn’t be using a feature like this. I think it could make it more difficult for support people to diagnose problems or clone a design.
I already proposed the idea of treating the new CPT like an attachment, in that it would hold the file information of where the CSS is stored, and it would be embedded using a link tag, which means anything other than CSS in the file would be ignored.
The problem I see with the way the interface is proposed is that the live preview should only come after the CSS is entered. Before that, there needs to be a way to toggle to see the source of the page so the proper selectors can be found. Basically, you need to have the browser’s Developer Tools there so you can see the existing selectors and the cascade and the autocomplete, etc.
FolioVision 4:13 pm on October 20, 2016 Permalink | Log in to Reply
Thank you for articulating our shared concerns so well Hugo. A hidden custom CSS feature is a troubleshooting nightmare conceived to destroy developers lives. End users in the end won’t like it either when neither they nor their developer can make their site run right again without starting from scratch.
The situation isn’t quite as bad as I’ve described above for very well organised developers (I imagine you fall into this class too Hugo). We’ll just add yet another nuisancy check to our checklists of what to do before we start work on a site.
For our internal clients, we’ll be disabling the Customizer completely I believe as our clients don’t want a tool which could break their sites available to any site admin. It’s funny that developers all have to spend as much time fighting WordPress core these days as working with it.
What we really need is rock solid caching in core and a built-in security solution and not more toys to break and slow websites. A CSS tweaker or theme builder should be standalone software or a web-based server. I don’t understand why we aren’t all working on such a tool together with Nick. Building a theme building into the core of your CMS is a very, very bad idea for performance, security and maintenance reasons.
Complexity killed the cat.
laur3ntv 12:19 pm on October 12, 2016 Permalink | Log in to Reply
What I generally do is that I try all the CSS changes in the Chrome Inspector and they apply them in a custom CSS plugin or file. It’s not user friendly and I have to go back and forth between the two.
So I really love this feature proposal and give a huge upvote 🙂
Thank you Nick!
Timothy Jacobs 7:08 pm on October 12, 2016 Permalink | Log in to Reply
This is great! Fantastic work. Excited to see where this goes over the next few releases.
Weston Ruter 8:58 pm on October 12, 2016 Permalink | Log in to Reply
Since the only feature provided in the
WP_Customize_Code_Editor_Controlis line numbers, I think we should skip including this in favor of just using a regulartextareacontrol. In the future when we actually have a code editing control powered by a library like CodeMirror, then thetextareacontrol can be replaced.Daniel Bachhuber 9:01 pm on October 12, 2016 Permalink | Log in to Reply
Echoing my comments made in Slack, I’m -1 on this proposal for a couple of reasons:
1. A lot of my (and others)
post_type != 'revision'code is going to potentially break. There’s historical precedent that revisions are the only “hidden” post type.2. I’m not sold on adding more IDE features to WordPress (that we’ll eventually need to replicate in the REST API)
I’m opinionated towards having WordPress make decisions as to which elements of the page are configurable and how they can be configured (e.g. header color or background image), over recreating an IDE within the WordPress admin.
Aaron Jorbin 2:48 am on October 13, 2016 Permalink | Log in to Reply
Assuming revisions are the only post type with no UI is far from a best practice. `nav_menu_item` for instance is another non-public nonstandard UI post type already in core.
idealien 11:25 pm on October 12, 2016 Permalink | Log in to Reply
Question: Would this respect the DISALLOW_FILE_EDIT config variable?
Aaron Jorbin 2:44 am on October 13, 2016 Permalink | Log in to Reply
This isn’t a file edit, so I don’t think it should.
Aaron Jorbin 2:50 am on October 13, 2016 Permalink | Log in to Reply
After playing with this, I wonder if it would make sense to add an “Import from Theme” selector of some sort. That might give you a leg up when you switch themes. Was this tested at all?
Timothy Jacobs 4:33 am on October 13, 2016 Permalink | Log in to Reply
That would be really nice.
davetgreen 7:17 am on October 13, 2016 Permalink | Log in to Reply
I’d like to see a couple of filters introduced so that developers can:
Primoz Cigler 3:28 pm on October 17, 2016 Permalink | Log in to Reply
Most of these things you can do already using built-in filters (Additional CSS feature is built on top of the existing persistant data mechanism in WP), but most probably there will be more specific ones available too. One example https://developer.wordpress.org/reference/hooks/theme_mod_name/
justnorris 9:01 am on October 13, 2016 Permalink | Log in to Reply
Why not keep this as a plugin ? Why add more bloat to the core? I don’t see the argument for killing CSS Plugins just because they’re popular.
All plugins solve some problem that the core has. There are 300’000 people using bbPress, I don’t see WordPress becoming a forum software in it’s core any time soon.
Regenerate thumbnails has 1m+ installs, maybe merge that into core too – people obviously need it and it helps people after they switch themes or thumbnail sizes.
The list goes on – “Disable Comments”, “Google Analytics”, “Loco Translate”, etc.
Plugins extend the core. That’s what they’re made for, that’s why WordPress is awesome – everyone can customize the software to their own liking.
Features that aren’t useful to most users should not be added to the core.
This is going to clutter the interface, it’s going to add bloat to the core. If it ain’t broke, don’t fix it
I get it. Custom CSS is rad, I make themes too, I get people asking for CSS modifications too. That’s why you have plugins like Custom CSS. There is just no need for this to become core.
treykane 4:06 pm on October 13, 2016 Permalink | Log in to Reply
I’m a few days late to this debate, but I see a fundamental problem here…
I have conflicted feelings on this feature as I know I’ve had many clients in the past that wanted this ability, and plenty of good plugins have provided exactly already. But, it seems WordPress is starting to diverge down two different paths, which is a much deeper problem than this proposal.
1.) WordPress has been going for some time in the direction of becoming a CMS that supports data in a REST API. I think this is great, it puts WordPress in a position to become the backend for web applications of all kinds. Its user friendly, gives content editors a familiar place to go and work on their content, while still providing the developer with the flexibility to do whatever they need to on the front end.
2.) WordPress keeps adding features like this one, that allow the user to customize the front end, and empowers the user to do whatever they want to do on the site. While this isn’t bad and is in-fact GREAT for a consumer centric product, its in contention with my first point.
TL;DR –
It feels like WordPress is trying to be two different products at once and at some point this is going to become a serious problem, on one end or the other. It feels like this proposal just continues to push the potential for identity crisis another step further.
Ximbalo 4:52 pm on October 14, 2016 Permalink | Log in to Reply
This is a welcome topic that I have often wondered “How long before WP adds this feature?”
I can see quite clearly how this would be a valuable and helpful feature for “simple customization” requirements.
As long as it does not imply a gradual “phasing out” of the continued ability for more advanced and experienced developers to still create child-themes as needed.
In my projects at least 50% of all child-theme edits are specific to and focused on the PHP of the parent theme and not just the CSS.
Here is my input on the topic:
1. Must Remain: PHP File Overrides:
As a professional developer, I almost always cannot properly complete a project, nor apply ideal code-and-content top-down flow optimizations, without resorting to PHP template overrides. Suffice it to say, rarely does any given theme’s built-in page header or body structure suffice for my client customization requirements. The built-in CSS editor feature sounds great… as long as it does not lead to my eventually not being able to create child-theme PHP page template & include file overrides.
2. Unwanted: Long Streams of Embedded Inline CSS
To me, one of the *very worst* and sloppy coding bad habits of WP Theme developers in recent years, is that of “dumping” custom CSS directly into the code-flow as inline CSS — rather than at least allowing for the custom CSS to be compartmentalized into a single “custom.css.php” file.
I have seen some themes that include a checkbox for this option – and I always admire that. If it does not exist, I will add my own PHP to remove the hundreds or thousands of lines of inline CSS that get dumped into my would-be “clean and optimized code”.
Thus, when this new feature is added to WordPress, it would be good to include an option for all custom CSS to be written into a PHP generated include file. (Understood and acknowledged is the idea that this option is not compatible with DISALLOW_FILE_EDIT or Security Plugins that turn off back-end file edits.)
3. SUMMARY: As a professional developer…
A) I would use and benefit from this feature in cases of small, simple edits to a relatively simple site.
B) I would use this feature to make clearly accessible certain “global styles” that I actually WANTED my client to be able to edit on their own ( i.e. global use of font styles, colors, & such )
C) But only if an option was available to encapsulate the cusotm CSS into a single file (avoid dumping reams of inline CSS)
D) I would NOT use this feature when hundreds of lines of advanced custom CSS are required
E) This feature should really not be confused with no longer actually needing child themes due to the requirement of being able to override PHP template files.
Thank You,
XIMBALO
Philip Ingram 3:39 pm on October 20, 2016 Permalink | Log in to Reply
As mentioned here -> https://core.trac.wordpress.org/ticket/35395#comment:71, I still feel like this type of tool is more “developer-centric” as 99% of my clients would never use this nor would I expect them to however I do see value in power users using something like this to tweak and fix very minor css.
Ultimately, yes I do want this…but in core? Not so sure about that. I want to be able to turn this off and leave no dependency on loading the actual css from the db on the front end. The db stored css should only be used for revisions and live editing in the customizer and I feel the front end should still reference actual files that can be post-processed, cached and even off-hosted such as a CDN.
If we can figure out a way of writing logical files that WP automatically loads based on file naming structure, similar to how themes do this now with the php file naming conventions, we would be golden and no one can complain about bloat, extra db cost etc. But again, do we need IDE features like this built into the core or should we amend the core only to allow for bettering our IDE plugins we use for development?
Maybe we should consider requiring a constant in wp-config to enable IDE development features of wordpress, like this, like the current theme/plugin editors?
Sebastian Pisula 7:45 am on October 21, 2016 Permalink | Log in to Reply
Why CPT? Why not theme_mods?
Ipstenu (Mika Epstein) 4:17 pm on October 21, 2016 Permalink | Log in to Reply
CPTs are posts and posts have revisions so you can go back 🙂
Luke Cavanagh 9:34 pm on November 4, 2016 Permalink | Log in to Reply
Will there be a global option for the custom css, so certain css could carry over if it was just plugin specific and not theme specfic and not be lost when a user changes themes.