https://github.com/undercloud/inlinecss
Inline CSS Generator
https://github.com/undercloud/inlinecss
Last synced: 3 months ago
JSON representation
Inline CSS Generator
- Host: GitHub
- URL: https://github.com/undercloud/inlinecss
- Owner: undercloud
- Created: 2016-02-06T19:00:47.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-09T21:22:49.000Z (almost 10 years ago)
- Last Synced: 2025-01-31T00:18:17.989Z (about 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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');
```