summaryrefslogtreecommitdiff
path: root/plugins/Customizer/vendor/luizbills/css-generator/demo
diff options
context:
space:
mode:
authorDzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl>2019-12-10 11:34:53 +0100
committerDzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl>2019-12-10 11:34:53 +0100
commitb8fa0246803dab40cf57d40b45984c53046f2d55 (patch)
treedc92b167c7542137c385614a1d558e57669a4339 /plugins/Customizer/vendor/luizbills/css-generator/demo
parent2a43146236fd8fb16f84398d85720ad84aa0a0b1 (diff)
Plugins directory and local modifications
Diffstat (limited to 'plugins/Customizer/vendor/luizbills/css-generator/demo')
-rw-r--r--plugins/Customizer/vendor/luizbills/css-generator/demo/demo.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/Customizer/vendor/luizbills/css-generator/demo/demo.php b/plugins/Customizer/vendor/luizbills/css-generator/demo/demo.php
new file mode 100644
index 00000000..69e6a4a1
--- /dev/null
+++ b/plugins/Customizer/vendor/luizbills/css-generator/demo/demo.php
@@ -0,0 +1,41 @@
+<?php
+
+require_once __DIR__ . '/../vendor/autoload.php';
+
+use luizbills\CSS_Generator\Generator as CSS_Generator;
+
+$options = [
+ 'indentation' => ' ', // 2 spaces
+];
+$css = new CSS_Generator( $options );
+
+// single selector
+$css->add_rule( '.color-white', [ 'color' => '#fff' ] );
+
+$css->open_block( 'media', 'screen and (min-width: 30em)' );
+
+// multiple selectors
+$css->add_rule( [ 'html', 'body' ], [
+ 'background-color' => 'black',
+ 'color' => 'white'
+] );
+
+$css->close_block(); // close a block
+
+$css->open_block( 'supports', '(display: grid)' );
+
+$css->add_rule( '.grid', [
+ 'display' => 'grid',
+] );
+
+// nested block
+$css->open_block( 'media', 'screen and (max-width: 30em)' );
+
+$css->add_rule( '.grid-sm', [
+ 'display' => 'grid',
+] );
+
+$css->close_blocks(); // close all blocks
+
+$minify = false;
+echo $css->get_output( $minify ); \ No newline at end of file