PHP code example of krypton / styles
1. Go to this page and download the library: Download krypton/styles 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/ */
krypton / styles example snippets
use Krypton\Styles\Styles;
$css = [
[
'names' => [
'.red'
],
'attrs' => [
'color' => '#F00'
]
],
[
'names' => [
'.blue'
],
'attrs' => [
'color' => '#F0F'
]
],
[
'names' => [
'.grey'
],
'attrs' => [
'color' => '#999'
]
],
[
'names' => [
'.green'
],
'attrs' => [
'color' => '#0F0'
]
]
];
$styles = new Styles($css);
echo $styles->render();