PHP code example of 10usb / css-lib
1. Go to this page and download the library: Download 10usb/css-lib 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/ */
10usb / css-lib example snippets
$document = new Document();
$parser = new Parser($document->addSegment('style.css')); // could be any name
$parser->setSource(file_get_contents('style.css'));
$parser->parse();
$path = new Path($document, new ExampleTranslator());
$path->push()->setTagName('html');
$path->push()->setTagName('body');
$path->push()->setTagName('section')->addClass('slides');
// prints the height value the section slide would get
echo $path->getValue('height');