1. Go to this page and download the library: Download irmmr/rtlcss library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
irmmr / rtlcss example snippets
// it's very simple and I know this
$css_code = "div { float: left; }";
// parse css code
$css_parser = new Parser($css_content);
try {
$css_tree = $css_parser->parse();
} catch (SourceException $e) {
// Error occ
return;
}
// create rtlcss parser
$rtlcss = new RTLParser($css_tree);
// parsing css rules and properties
$rtlcss->flip();
// get parsed css code ==> div {float: right;}
echo $css_tree->render();