How do I create rtl.css in my plugin
-
I am author of a plugin which creates a file called bspstyle.css and it is enqueued as per standard.
I need to create a small css for rtl sites.
I have read that for a theme the style.css has a rtl.css that does the rtl stuff.
2 questions :
1. How do I get my plugin to have an rtl version and how do I make it enqueued correctly?
currently I enqueue as follows :
wp_register_style('bsp', plugins_url('css/bspstyle.css',dirname(__FILE__) ), array( 'bbp-default' )); wp_enqueue_style( 'bsp');
as part of a function that is called by
add_action('wp_enqueue_scripts', 'bsp_enqueue_css');
Do I have to enqueue a new file, or is there a plugin version of an rtl.css file?
2. Does the rtl replace the original bspstyle.css for rtl sites, or does it fire after?
ie do I have to repeat all the css, or just have the changes needed for rtl sites in my alternate css file?
Thanks for your help in advance
- The topic ‘How do I create rtl.css in my plugin’ is closed to new replies.