An open API service indexing awesome lists of open source software.

https://github.com/undercloud/inlinecss

Inline CSS Generator
https://github.com/undercloud/inlinecss

Last synced: 3 months ago
JSON representation

Inline CSS Generator

Awesome Lists containing this project

README

          

# inlinecss
Inline CSS Generator

##Install
```composer require undercloud/inlinecss```

##Basic example
```PHP
require 'vendor/autoload.php';

$css = new \Undercloud\InlineCss;

$css->color = '#282828';
$css->lineHeight = 1.5;
$css->fontSize = '36px';

echo '

Hello I\'m inline CSS

';
```
or
```PHP
echo '' . $css('h1') . '';
```

##Predefined properties
```PHP
$css = new \Undercloud\InlineCss(
array(
'textAlign' => 'left',
'display' => 'inline-block',
'position' => 'relative'
)
);
```

##Values
For adding values use object assign
```PHP
$css->color = '#282828';
```
or use function ```add```
```PHP
$css->add('color', '#282828');
```