Overview

Packages

  • Jyxo_Beholder
  • Jyxo_Charset
  • Jyxo_Color
  • Jyxo_Css
  • Jyxo_ErrorHandling
  • Jyxo_FirePhp
  • Jyxo_Gettext
    • Parser
  • Jyxo_Html
  • Jyxo_Input
    • Chain
    • Filter
    • Validator
  • Jyxo_Mail
    • Email
    • Parser
    • Sender
  • Jyxo_Rpc
    • Json
    • Xml
  • Jyxo_Shell
  • Jyxo_SpamFilter
  • Jyxo_Spl
  • Jyxo_String
  • Jyxo_Svn
  • Jyxo_Time
  • Jyxo_Timer
  • Jyxo_Webdav
  • Jyxo_XmlReader
  • PHP

Classes

  • Jyxo_Css
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Jyxo_Css

Class for working with CSS stylesheets.

Category: Jyxo
Package: Jyxo_Css
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Css.php
Methods summary
final public
# __construct( )

Constructor preventing from creating static class instances.

Constructor preventing from creating static class instances.

Throws

LogicException
When trying to create an instance
public static string
# repair( string $css )

Cleans up a CSS stylesheet.

Cleans up a CSS stylesheet.

Parameters

$css
string
Stylesheet definition

Returns

string
public static string
# filterProperties( string $css, array $properties, boolean $exclude = true )

Filters given properties.

Filters given properties.

Parameters

$css
string
Stylesheet definition
$properties
array
Filtered properties
$exclude
boolean
If true, $properties will be removed from the stylesheet; if false, only $properties will be left

Returns

string
public static string
# pack( string $css )

Removes unnecessary characters from a CSS stylesheet.

Removes unnecessary characters from a CSS stylesheet.

It is recommended to use the repair() method on the stylesheet definition first.

Parameters

$css
string
Stylesheet definition

Returns

string
public static string
# convertStyleToInline( string $html )

Converts HTML styles inside <style> elements to inline styles.

Converts HTML styles inside <style> elements to inline styles.

Supported selectors:

  • a {...}
  • #header {...}
  • .icon {...}
  • h1#header {...}
  • a.icon.small {...}
  • a#remove.icon.small {...}
  • a img {...}
  • h1, h2 {...}
  • a:link {...} - converts to a {...}

Parameters

$html
string
Processed HTML source

Returns

string
Jyxo PHP Library API documentation generated by ApiGen 2.3.0