Closed alexbogias closed 1 year ago
A :not
selector, of course
It maybe breaks the :focus state... Give me some time to check...
@alexbogias Have you looked at this again?
Yeah I think that it breaks the :hover and :disabled states :( Anyway 50k compiled css it's huge for this imo
I agree 50kb is huge. Especially for something that might not be used for a project!
I'm gonna say something controversial.
Why not leave it as it was, then comment the import of the file. And let it be up to devs to enable contact-form7 support.
As a matter of fact, do the same for woocommers, font-awesome etc.
I agree as well, Contact Form 7 support doesn't seem as useful as it once was. I would hate to drop support on it though for existing users (if you're a dev trying to optimize a site, you can comment it out yourself, like we do on most of our sites).
I looked through CF7 to see if we could do an opposite approach (add the form-control
class to the output via a php filter), but it doesn't seem like that filter exists.
I would be interested in doing something similar to how we load php conditionally for Woocommerce. We could generate a separate CSS file for CF7 and only load it if the plugin is active...?
Yeah adding the class with a filter would be much better imo
This change saves around 50kb of minified css