-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Plugin CSS? #1
Comments
I agree that we should include CSS with the plugin. However, I don't think it makes sense to include the CSS setting in the shortcode. What happens if someone puts the shortcode on a page twice, once with it on, and once with it off? I'd say let's just always enqueue the CSS on the front-end. If someone doesn't like the CSS, they can always dequeue it or override the style declarations in their own CSS. There are also ways of allowing the theme to override views. We could pretty easily do that, so users could create custom markup in their theme. I think that's probably a feature that can wait until the plugin is a bit closer to completion. |
Totally misinterpreted the "Close & Comment" button... |
My other idea was to look for a |
// Our code
wp_enqueue_style( 'contractor-directory', ... );
// ...
// Inside the theme's functions.php, or wherever
wp_dequeue_style( 'contractor-directory' ); I feel like that's simple enough that theme developers should be able to do it without too much headache. Similarly, I'd be in favor of not looking for |
Sounds good, Should I put the CSS in the CSS folder or views? |
Let's leave the views folder for PHP layouts. I'm fine with a /css folder. We can either do /css, /images, and /js folders, or we can create one /resources or /assets folder for everything, since we'll probably only have a few files. Up to you. |
Hi - sounds like we have a plan for including CSS that a themer can dequeue as they wish. Sounds clean to me. I just found this discussion area. It was good meeting and working with you two last night. Thanks, |
I was thinking about how this will be released back to the community and think that we need some CSS inside the plugin. I'm thinking something like
wp_enqueue_style
by default then having our shortcode have the argument[contractor-shortcode css=false
to allow the CSS to be turned off.Thoughts?
The text was updated successfully, but these errors were encountered: