glFusion Wiki

Site Tools


glfusion:development:api:output_class:addstyle

outputHandler::addStyle

(glFusion SVN)

addStyle – Adds raw CSS to page header

Description

void addStyle($code, $priority = HEADER_PRIO_NORMAL, $mime = 'text/css')

Adds raw CSS to the page header. The CSS should not be wrapped in <style> tags.

Parameters

code

The CSS code to be sent to the browser. This function will automatically 
wrap the CSS code with the necessary <style> </style> tags.

priority

The load priority of the CSS data.  Options are:

  * HEADER_PRIO_VERYHIGH
  * HEADER_PRIO_HIGH
  * HEADER_PRIO_NORMAL
  * HEADER_PRIO_LOW
  * HEADER_PRIO_VERYLOW

Items with HEADER_PRIO_VERYHIGH are sent to the browser before 
those with HEADER_PRIO_HIGH…

The default value is HEADER_PRIO_NORMAL.

mime

Mime type to use for the code.  
The default value is ‘text/css’

Return Value

No value is returned.

Example

Notes

See Also

glfusion/development/api/output_class/addstyle.txt · Last modified: 2017/04/12 21:15 (external edit)

Page Tools