https://github.com/blynx/markupautostylesheets
ProcessWire module: Helper for automatic stylesheet inclusion
https://github.com/blynx/markupautostylesheets
module processwire processwire-modules stylesheets
Last synced: 7 days ago
JSON representation
ProcessWire module: Helper for automatic stylesheet inclusion
- Host: GitHub
- URL: https://github.com/blynx/markupautostylesheets
- Owner: blynx
- Created: 2017-02-20T00:46:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-20T08:27:54.000Z (over 8 years ago)
- Last Synced: 2025-07-19T05:32:40.463Z (7 months ago)
- Topics: module, processwire, processwire-modules, stylesheets
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MarkupAutoStylesheets
Gather stylesheets and automatically add CSS links to the HTML document just after the page render. Three positions are available: before, after and the default position inbetween.
Define ids to overwrite already defined stylesheet urls with the same id.
### Methods
`::add($url, $id, $options)`
Add / append stylesheet to default 'middle' position.
`::addBefore($url, $id, $options)`
Add / append stylesheet to 'before' position.
`::addAfter($url, $id, $options)`
Add / append stylesheet to 'before' position.
`::getMergedArray(boolean $retainAutoMarkup)`
get the array of all stylesheets combined. By default it will deactivate automatic markup generation.
Set `$retainAutoMarkup` to true to retain automatic markup generation.
### Todo
- support Stylus <3
- make protected stylesheets work
- prependBefore(), prepend(), prependAfter(), append() alias
- support LESS like AIOM