Documentation

StyleLoader extends AutoService
in package
implements EventSubscriberInterface

This class generates a `river.css` file for Riverlea streams containing dynamically generated css content

At the moment this is used to serve the right vars for a given dark mode setting

Tags
service

riverlea.style_loader

Table of Contents

Interfaces

EventSubscriberInterface

Constants

CORE_FILES  = ['_variables.css', '_fonts.css', '_base.css', '_cms.css', 'components/_accordion.css', 'components/_alerts.css', 'components/_buttons.css', 'components/_form.css', 'components/_icons.css', 'components/_nav.css', 'components/_tabs.css', 'components/_dropdowns.css', 'components/_tables.css', 'components/_dialogs.css', 'components/_page.css', 'components/_components.css', 'components/_front.css', '_fixes.css']
DYNAMIC_FILE  = 'river.css'

Methods

alterBundles()  : void
buildDynamicCss()  : mixed
Generate asset content (when accessed via AssetBuilder).
getCssParams()  : array<string|int, mixed>
getSubscribedEvents()  : mixed
isActive()  : bool
Is a Riverlea stream selected as the current theme?
onChangeFontsize()  : mixed
Get font size setting and add a variable for it to the CSS properties of every stream
onGetThemes()  : void
validateFontSize()  : bool
Validate the font size setting: it should be a floating point number (CSS font size in rem)
getAvailableStreamMeta()  : array<string|int, mixed>

Constants

CORE_FILES

public mixed CORE_FILES = ['_variables.css', '_fonts.css', '_base.css', '_cms.css', 'components/_accordion.css', 'components/_alerts.css', 'components/_buttons.css', 'components/_form.css', 'components/_icons.css', 'components/_nav.css', 'components/_tabs.css', 'components/_dropdowns.css', 'components/_tables.css', 'components/_dialogs.css', 'components/_page.css', 'components/_components.css', 'components/_front.css', '_fixes.css']

DYNAMIC_FILE

public mixed DYNAMIC_FILE = 'river.css'

Methods

getCssParams()

public getCssParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSubscribedEvents()

public static getSubscribedEvents() : mixed

isActive()

Is a Riverlea stream selected as the current theme?

public isActive() : bool
Return values
bool

onChangeFontsize()

Get font size setting and add a variable for it to the CSS properties of every stream

public static onChangeFontsize(mixed $oldValue, mixed $newValue, mixed $metadata) : mixed
Parameters
$oldValue : mixed
$newValue : mixed
$metadata : mixed

onGetThemes()

public onGetThemes(mixed $e) : void
Parameters
$e : mixed

validateFontSize()

Validate the font size setting: it should be a floating point number (CSS font size in rem)

public static validateFontSize(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

getAvailableStreamMeta()

protected getAvailableStreamMeta() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results