Download the PHP package wikimedia/cssjanus without Composer
On this page you can find all versions of the php package wikimedia/cssjanus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wikimedia/cssjanus
More information about wikimedia/cssjanus
Files in wikimedia/cssjanus
Package cssjanus
Short Description Convert CSS stylesheets between left-to-right and right-to-left.
License Apache-2.0
Homepage https://www.mediawiki.org/wiki/CSSJanus
Informations about the package cssjanus
CSSJanus
Convert CSS stylesheets between left-to-right and right-to-left.
Usage
Parameters;
$css(string) Stylesheet to transform.$swapLtrInURL(boolean) Swapltrtortldirection in URLs.$swapLeftInURL(boolean) Swapleftandrightedges in URLs.
Example:
Preventing flipping
If a rule is not meant to be flipped by CSSJanus, use a /* @noflip */ comment to protect the rule.
CSS Logical Properties
We encourage and recommend use of CSS logical properties for the subset of CSS features where a native direction-aware version of a CSS property exists (be sure to check browser support for specific properties).
You can, for example, set properties like margin-inline-start instead of margin-left, which the browser flips based on content direction, and work seamlessly alongside other CSS properties that CSSJanus flips instead.
Note that CSS logical properties flip based on nearest content direction and content language, whereas CSSJanus is generally configured to flip by user language and UI direction.
Port
CSSJanus was originally a Google project created by Lindsey Simon in 2008, written in Python. It was ported to PHP by Roan Kattouw in 2010 for use in MediaWiki, and ported to Node.js by Trevor Parscal in 2012.
As of 2014, the canonical specification and reference implementation is node-cssjanus, which is then ported to PHP after each release.
Contribute
- Issue tracker: https://phabricator.wikimedia.org/tag/cssjanus/
- Source code: https://gerrit.wikimedia.org/g/mediawiki/libs/php-cssjanus
- Submit patches via Gerrit: https://www.mediawiki.org/wiki/Developer_account