SproutCMS

This is the code documentation for the SproutCMS project

function css()

ECHOs one or more <link> tags referring to specified CSS files.
Uses variable arguments, one per css file.
The URLs will contain embedded timestamps, making them auto-versioned

Usage example:
  <?php Skin::css('reset', 'layout', 'content'); ?>

Optionally provide an array to specify attributes, like so:
  <?php Skin::css('site', 'home', ['crossorigin' => 'anonymous', 'media' => 'print']); ?>
Will return:
  <link href="skin-ts/skin/css/site.css" rel='stylesheet' media='print'>
  <link href="skin-ts/skin/css/home.css" rel='stylesheet' media='print'>

There isn't a guarantee that multiple tags will be ECHOed, but the order will always remain as specified.
If you need more control use the helper `css_url` and echo the tags yourself.

Usage

void Skin::css ( );

Return value

  • void