lithium\template\helper\Html::style()
Creates a <link />
element for CSS stylesheets or a <style />
tag. If the filename is
prefixed with '/'
, the path will be relative to the base path of your application.
Otherwise, the path will be relative to your stylesheets path, usually webroot/css
.
Parameters
-
mixed
$path
The name of a CSS stylesheet in
/app/webroot/css
, or an array containing names of CSS stylesheets in that directory. -
array
$options
Available options are:
'inline'
boolean: Whether or not the<style />
element should be output inline. When set tofalse
, thestyles()
handler prints out the styles, and other specified styles to be included in the layout. Defaults totrue
. This is useful when page-specific styles are created inline in the page, and you'd like to place them in the<head />
along with your other styles.'type'
string: By default, acceptsstylesheet
orimport
, which respectively correspond tostyle-link
andstyle-import
strings templates defined inHtml::$_strings
.- any other options specified are rendered as HTML attributes of the element.
Returns
stringCSS or