Title: Share CSS between shortcodes
Last modified: November 19, 2020

---

# Share CSS between shortcodes

 *  [rosalynnas](https://wordpress.org/support/users/rosalynnas/)
 * (@rosalynnas)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/share-css-between-shortcodes/)
 * It would be nice if there was some way to share css directly between shortcodes
   in a way that is contained within the plugin, outside of putting it in the main
   css file of the theme or a link to a file to be included.
 * I have multiple instances of the same element where only the HTML is different,
   but I didn’t want to extract the CSS into the main theme file since it makes 
   it less easily portable. I tried repeating the css in both files but in doing
   this, I noticed a bug that some media queries do not work when the same CSS rule
   is included in two shortcodes.
 * Is there a solution to this already?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Wow-Company](https://wordpress.org/support/users/wpcalc/)
 * (@wpcalc)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/share-css-between-shortcodes/#post-13686746)
 * Hello.
 * You can create a duplicate of the item and the duplicate will have the CSS of
   the main item.
 * Or I misunderstood you?

Viewing 1 replies (of 1 total)

The topic ‘Share CSS between shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/wp-coder/assets/icon.svg?rev=3359026)
 * [WP Coder – Insert & Manage Code Snippets](https://wordpress.org/plugins/wp-coder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-coder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-coder/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-coder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-coder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-coder/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Wow-Company](https://wordpress.org/support/users/wpcalc/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/share-css-between-shortcodes/#post-13686746)
 * Status: not resolved