二十日☆鼠 - IKEDA Soji > CSS-Flip-0.04_03 > CSS::Janus

Download:
CSS-Flip-0.04_03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.04_02   Source  

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 has 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.

flip_url => 0|1

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

ignore_bad_bgp => 0|1

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

swap_ltr_rtl_in_url => 0|1

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

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

CSS::Yamaantaka

cssflip(1)

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.

syntax highlighting: