PHP code example of pafnuty / less-for-bitrix

1. Go to this page and download the library: Download pafnuty/less-for-bitrix 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/ */

    

pafnuty / less-for-bitrix example snippets


<?$APPLICATION->IncludeComponent(
    "codenails:cn.less", 
    "", 
    array(),
    false
);

<?\Bitrix\Main\Page\Asset::getInstance()->addCss('/local/assets/css/compiled_file.css');