waughj / html-stylesheet
Simple class for easy generation o' stylesheets.
0.1.0
2018-11-30 23:55 UTC
Requires
- php: >=7.0
- waughj/file-loader: *
- waughj/html-attribute-list: *
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2025-03-05 20:43:01 UTC
README
Simple class for easy generation o' stylesheets.
Use
Just call constructor with 1st argument a string representing the URL, & 2 optional arguments for a file loader & an array o' extra attributes to add to the HTML tag.
Example
WaughJ\HTMLStylesheet\HTMLStylesheet;
new HTMLStylesheet
(
'main',
new FileLoader([ 'directory-url' => 'https://www.example.com/css' ]),
[ 'media' => 'print' ]
);
Will output:
<link href="https://www.example.com/css/main.css" rel="stylesheet" media="print" />