PHP code example of rohan2388 / wp-css

1. Go to this page and download the library: Download rohan2388/wp-css 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/ */

    

rohan2388 / wp-css example snippets


$css = new \RD\WP\CSS();
$css->add_rule() // Select base class
  ->add_prop('color', '#000000');

$css->add_rule('a') // Select all <a> 
  ->add_prop('text-decoration', 'none');

html

use \RD\WP\Styles;
Styles::init();
  
Styles::add_rule('.text')
	->add_prop( 'color', 'red');
html
 $css->styles(); // Print style tag  
html

$styles = array(
  'color' => 'blue',
  'text-decoration' => 'none'
);