Download the PHP package prestashop/rtlcss-php without Composer
On this page you can find all versions of the php package prestashop/rtlcss-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prestashop/rtlcss-php
More information about prestashop/rtlcss-php
Files in prestashop/rtlcss-php
Informations about the package rtlcss-php
RtlCss
RtlCss is a library for converting Left-To-Right (LTR) Cascading Style Sheets(CSS) to Right-To-Left (RTL).
Usage
Installation using composer
Add the library to your composer.json
Flipping
For parsing options and rendering, refer to PrestaShop/PHP-CSS-Parser.
Output sample
Becomes:
Options
You can prefix your CSS with comments starting with /*rtl:*/
for special handling.
Do not flip values
Prepend with /*rtl:ignore*/
, or wrap within /*rtl:begin:ignore*/
and /*rtl:end:ignore*/
.
Becomes:
Remove CSS
Prepend with /*rtl:remove*/
, wrap within /*rtl:begin:remove*/
and /*rtl:end:remove*/
.
Becomes:
Additional CSS
Write the CSS in a content starting with /*rtl:raw:
.
Becomes:
Limitation
Currently the comments must always precede a statement, they will not work if they are not followed by anything.
Valid:
Invalid:
CSS support
A lot of common CSS rules are supported, however a few complex ones are not. To get a grasp of what is supported and what isn't, please refer to the test cases. Unsupported scenarios are marked to be skipped.
About this tool
This tool is very heavily inspired by MohammadYounes/rtlcss, even though at this stage it does not include all of its features. See this library as a partial port of the latter.
Credits
- moodlehq/rtlcss-php Original work
- MohammadYounes/rtlcss for being the example we followed.
- cssjanus/php-cssjanus for providing additional test cases.
- Sabberworm/PHP-CSS-Parser for parsing CSS in PHP.
License
Licensed under the MIT License.