CSS
CSS PHP Methods
breackCSSClasses(string $css) v5
Break css classes to an array
PARAMETERS:
$css = string, CSS code content
RETURN VALUE:
Array = list of css classes BreakCSS(string $css) v5
Break CSS code to an array
PARAMETERS:
$css = string, CSS code content
RETURN VALUE:
Array = CSS code after converting it to an arraystatic combineElement(string $elementName, string $cssCont) v5
Combine css elements to obtimize
PARAMETERS:
$elementName = string, Element name to combine
$cssCont = string, CSS code content
RETURN VALUE:
Array = CSS code as an array compressCSS(string $oCSS) v5
Compress css code
PARAMETERS:
$oCSS = string, Original CSS code
RETURN VALUE:
string = CSS code after compression extractCSSFromHead(string $headContent, string $cssCont = "", int $tCPCID = 0) v5
Extract CSS content from page head tag
PARAMETERS:
$headContent = string, Page head tag contents
$cssCont = string, CSS content
$tCPCID = int, Capture page content ID
RETURN VALUE:
Array = List of CSS content from page head tag getCSS() v5
converts css back to code after converting it to an array
PARAMETERS:
NONE
RETURN VALUE:
string = CSS codestatic getElementCSS(string $elementName, string $cssCont) v5
Gets an element CSS content
PARAMETERS:
$elementName = string, Element name (selector name)
$cssCont = string, CSS content for the $elementName
RETURN VALUE:
string = element CSS contentstatic moveMediaToBottom(string $cssCont) v5
Move CSS media queries to the bottom of CSS code
PARAMETERS:
$cssCont = string, CSS code contents
RETURN VALUE:
Array = CSS contents as an array having 2 keys "media" => for media queries | "css" for the other css code notUsedCSS(array $idArray, array $classArray, array $tagArray) v5
Remove unused CSS from CSS array
PARAMETERS:
$idArray = array, Unused id array
$classArray = array, Unused class array
$tagArray = array, unused tag array
RETURN VALUE:
void rebuildCSS(string $oCSS, int $width = 0) v5
rebuild css content
PARAMETERS:
$oCSS = string, CSS content
$width = int, max width value (in px)
RETURN VALUE:
string = CSS content after rebuilding it removeComments(string $cssFileCont) v5
Remove CSS comments
PARAMETERS:
$cssFileCont = string, CSS original code content
RETURN VALUE:
string = CSS code after removing the comments removeMainCSS(array $mainCSSArray) v5
Filter CSS contents by removing items using an array of unwanted items
PARAMETERS:
$mainCSSArray = array, unwanted CSS items to be removed
RETURN VALUE:
void removeMedia(string $cssFileCont) v5
Remove css media queries
PARAMETERS:
$cssFileCont = string, CSS code content
RETURN VALUE:
string = CSS code content after removing media queries resizeCSS(string $cssFileCont, int $maxWidth) v5
Modifying CSS by changing width and max width for elements (to resize elements)
PARAMETERS:
$cssFileCont = string, Original CSS code contents
$maxWidth = int, Max width in px
RETURN VALUE:
string = CSS code after modifying the width setShowLogs(bool $showLogs = true) v5
Sets show logs status
PARAMETERS:
$showLogs = bool, True to turn on show logs, false otherwise
RETURN VALUE:
voidCSS PHP Variables
$cssArray v5
$cssArrayDetails v5
$cssColors v5
$darkColor1 v5
String, default value = "000" $darkColor2 v5
String, default value="222" $lightColor1 v5
String, Default value = "FFF" $lightColor2 v5
string, default = "DDD" $maxWidth v5