Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

CssInliner::parseCssRules( string $css )

Extracts and parses the individual rules from a CSS string.


Description Description


Parameters Parameters

$css

(Required) a string of raw CSS code with comments removed


Top ↑

Return Return

(string[][][]) A 2-entry array with the key "inlinable" containing rules which can be inlined as style attributes and the key "uninlinable" containing rules which cannot. Each value is an array of string sub-arrays with the keys "media" (the media query string, e.g. "@media screen and (max-width: 480px)", or an empty string if not from a @media rule), "selector" (the CSS selector, e.g., "*" or "header h1"), "hasUnmatchablePseudo" (true if that selector contains pseudo-elements or dynamic pseudo-classes such that the declarations cannot be applied inline), "declarationsBlock" (the semicolon-separated CSS declarations for that selector, e.g., "color: red; height: 4px;"), and "line" (the line number e.g. 42)


Top ↑

Source Source

File: vendor/pelago/emogrifier/src/Emogrifier/CssInliner.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.