waughj/html-stylesheet

Simple class for easy generation o' stylesheets.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/waughj/html-stylesheet

0.1.0 2018-11-30 23:55 UTC

This package is auto-updated.

Last update: 2025-10-05 21:56:54 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" />