The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CSS::Janus - Converts a left-to-right Cascading Style Sheet (CSS) into a right-to-left one

SYNOPSIS

  use CSS::Janus;
  
  $janus = CSS::Janus->new;
  $css_source_rtl = $janus->transform($css_source);

DESCRIPTION

As Janus have two faces, horizontal texts can run in two directions: left to right and right to left.

CSS::Janus replaces "left" directed things in a Cascading Style Sheet (CSS) file such as float, padding, margin with "right" directed values, and vice versa.

This module is a Perl port of CSSJanus by Lindsey Simon <elsigh@google.com>.

Constructor

new ( [ options... ] )

Creates new CSS::Janus object. Following options are available.

swap_left_right_in_url => 0|1

Fixes "left"/"right" string within URLs. Default is 0, won't fix.

swap_ltr_rtl_in_url => 0|1

Fixes "ltr"/"rtl" string within URLs. Default is 0, won't fix.

ignore_bad_bgp => 0|1

Ignores unmirrorable background-position values. Default is 0, won't ignore and will croak it.

Method

transform ( $lines, [ options... ] )

Runs the fixing functions against CSS source.

$lines is a string. Following options are available.

swap_ltr_rtl_in_url => 0|1

Overrides this flag if param is set.

swap_left_right_in_url => 0|1

Overrides this flag if param is set.

Returns same lines directions (left and right) are changed.

VERSION

Consult $VERSION variable.

SEE ALSO

CSSJanus http://cssjanus.commoner.com/.

A PHP port of CSSJanus http://www.mediawiki.org/wiki/Manual:CSSJanus.php.

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.

COPYRIGHT

Copyright (C) 2013 Hatuka*nezumi - IKEDA Soji.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.