public static function SassPropertyNode::isPseudoSelector in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/tree/SassPropertyNode.php \SassPropertyNode::isPseudoSelector()
Returns a value indicating if the string starts with a pseudo selector. This is used to reject pseudo selectors as property values as, for example, "a:hover" and "text-decoration:underline" look the same to the property match regex. It will also match interpolation to allow for constructs such as content:#{$pos}
Parameters
string the string to test:
Return value
bool true if the string starts with a pseudo selector, false if not
See also
isa()
1 call to SassPropertyNode::isPseudoSelector()
- SassPropertyNode::isa in phpsass/
tree/ SassPropertyNode.php - Returns a value indicating if the token represents this type of node.
File
- phpsass/
tree/ SassPropertyNode.php, line 247
Class
- SassPropertyNode
- SassPropertyNode class. Represents a CSS property. @package PHamlP @subpackage Sass.tree
Code
public static function isPseudoSelector($string) {
preg_match(self::MATCH_PSUEDO_SELECTOR, $string, $matches);
return isset($matches[0]) && in_array($matches[0], self::$psuedoSelectors) || preg_match(self::MATCH_INTERPOLATION, $string);
}