There’s no standard. CSS specificity in themes varies wildly, and I’m convinced many theme authors are not even aware of the concept given some of the CSS I’ve seen.
If something is very important to the appearance of your plugin, then high specificity may be desirable, but in many cases if you’re just styling divs with unique class names, or form elements, then you should keep specificity low so than it can inherit styles from the theme as appropriate.
So really it’s case by case, and you’re not going to be able to guarantee results with all themes. A good rule of thumb is that your specificity should reflect how important it is that the styles are respected.
Related Posts:
- Using standard backend elements in Plugin
- Add CSS animation as Preloader to WordPress
- How do I register a stylesheet inside a WordPress widget?
- Unable to load stylesheets and scripts to plugin settings page
- How do I write into a file (css)
- What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?
- Adding CSS to custom post type admin page causes error
- Redirect to another page using contact form 7? [closed]
- Stop Plugin from Getting Styles from Other Plugin
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Images under 1MB are not being compressed
- change or add css to theme from plugin
- Custom CSS not being added by plugin
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Themes conflicts and overrides my WordPress Support widget Plugin styles
- Want to create custom design of progress indicator in wpforms
- Two plugins using the same CSS id
- SASS not showing in customized preloader plugin
- WP Plugin CSS not being applied to page
- how to add custom css at top above all css file for specific url
- How to create a “Most Popular” & “Latest” TAB in WordPress
- Getting a List of Categories for Use in a Plugin?
- Changing labels of status filters for post grid
- How do I modify the position of a plugin?
- Can we use a webservice with WordPress?
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- How do I add a custom sub menu menu under Woo-commerce marketing?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- How to load plugin after page is loaded – pagespeed issues
- Open Post Thumbnail in New Child Theme File in WordPress
- How to pull code snippet from functionality plugin?
- How to use get_theme_mod in gutenberg editor wordpress?
- MITM risk of not sanitizing?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- Where should I save an API key of my user when installing my plugin?
- How to make a customize role and view a specific plugins base on that role?
- Reusable functions and tools (Framework)
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Where (or when) should I register a new taxonomy?
- Woocommerce plugin for minimum order and add-to-card-step
- Self deactivate plugins after an action occurs
- How to get current post user id
- UnInstallation of a Plugin from a developers perspective – The correct and clean method
- Issue with adding count to “subsubsub” aka quick links on custom_post_type
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- How to slice an array using posts_per_page? [closed]
- White page on custom plugin option submit
- Simple ajax call not working in wordpress plugin
- Plugin version is not showing up in wordpress.org plugin directory
- Do action only on certain front end pages?
- Change plugin main file name (that is currently in the repo)
- Create dynamic page content from custom WordPress plugin page
- Plugin Options Not Saving to Database in WP 4.5
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- How to create ‘import dummy data’ option in custom wordpress plugin
- Call to a member function have_posts() on a non-object on normal loop
- JS Support Ticket – Auto create WP account
- WP Post Template – Templates in own folder
- Register Page Template from Plugin
- Private Plugin Updates – Localhost
- How to change custom post type pemalink Hierarcy
- plugin style conflicts, how to override? [closed]
- Any hook for pre-plugin-update -either bulk or single plugin update
- Get plugin option in another PHP file
- Is there an earlier hook than login_head or login_enqueue_scripts?
- wp_create_nonce function doesn’t work inside a plugin?
- How to disable CSS rule in Twentythirteen style.css?
- Test files for plugin development
- Input with spaces in Shortcode attributes overwritten by defaults
- Theme’s default styles are overriding my plugin’s custom CSS
- Unable to override pluggable function wp_mail
- Avoid class name collision when using third party libraries in plugins?
- How to create custom tables in WordPress using my own plugin?
- Remove ALL css for a specific plugin page
- New User Form – Custom Menu Page
- Own plugin corrups plugin-activation
- wordpress plugin is not activating from widget
- All Users > User List > Update User Meta Field Inline
- Checking instances of scripts in wp_head
- How to save post change url youtube link?
- Best approach to fetch data from wp options to js file or php file
- Correct way to perform non-cacheable DB query
- Allow users of my plugin to define their own shortcode rather than use mine?
- Is it possible to create Custom Post plug-in?
- Globally register styles but enqueue them selectively
- uninstall.php file in Plugin to clean DB
- Archive – same title for the first two posts
- Creating a plugin to sanitize comment and the url field before display only
- Edit Yoast SEO breadcrumbs output [closed]
- CSS from textarea in options page to frontend what to do