[wp-trac] [WordPress Trac] #28122: Themes - RTL: add support for fully mirrored css files

WordPress Trac noreply at wordpress.org
Sun May 4 19:52:01 UTC 2014


#28122: Themes - RTL: add support for fully mirrored css files
-------------------------+-----------------------------
 Reporter:  yoavf        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:
 Severity:  normal       |   Keywords:
  Focuses:  rtl          |
-------------------------+-----------------------------
 RTL support in themes is achieved through the creation of an rtl.css file,
 which is loaded (if it exists) in addition to the main theme css file. The
 rtl.css file should overwrite only those css properties from the main file
 that affect the horizontal layout.

 The creation of an rtl.css file is mostly a manual process, and keeping it
 up to date with the main theme style.css file is a difficult task.

 I propose that WordPress support loading of fully mirrored css files
 instead of the original theme css file, in a similar way to what was done
 for core/wp-admin css files in #24977.

 '''How will this work?'''
 - '''Backwards compatibility:''' If an {{{rtl.css file}}} is found in the
 theme root, it will be loaded as usual (in addition to {{{style.css}}}).
 Otherwise
 - Load {{{./rtl/style-rtl.css}}} if it exists '''instead''' of
 {{{style.css}}}
 - For any additional css file in the theme folder enqueued using
 wp_enqueue_style (i.e. {{{css/grid.css}}}), look for a filename-rtl.css
 file in an  rtl subdirectory (i.e {{{css/rtl/grid-rtl.css}}}) and load it
 if it exists instead of the original file.

 While theme developers will be able to chose their tool of choice to
 create an rtl css file, we'll make it easier for them by updating grunt-
 cssjanus to work when run in a theme directory.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28122>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list