Lines Matching refs:value
28 function build_subvalue($value) { argument
29 if ($value === "left" ||
30 $value === "top") {
34 if ($value === "right" ||
35 $value === "bottom") {
39 if ($value === "center") {
43 if (substr($value, strlen($value)-1,1) === "%") {
44 return array((int)$value, true);
46 return array($value, false);
55 function detect_type($value) { argument
56 if ($value === "left" || $value === "right") { return BG_POSITION_SUBVALUE_TYPE_HORZ; };
57 if ($value === "top" || $value === "bottom") { return BG_POSITION_SUBVALUE_TYPE_VERT; };
63 function parse_in($value) { argument
64 …."|\b0\b)\s+(".LENGTH_REGEXP."|".PERCENTAGE_REGEXP."|".TEXT_REGEXP."|\b0\b)/", $value, $matches)) {
84 if (preg_match("/\b(top)\b/",$value)) { return array(array(50, true), array(0, true)); };
85 if (preg_match("/\b(center)\b/",$value)) { return array(array(50, true), array(50, true)); };
86 if (preg_match("/\b(bottom)\b/",$value)) { return array(array(50, true), array(100, true)); };
87 if (preg_match("/\b(left)\b/",$value)) { return array(array(0, true), array(50, true)); };
88 if (preg_match("/\b(right)\b/",$value)) { return array(array(100, true), array(50, true)); };
90 if (preg_match("/".LENGTH_REGEXP."|".PERCENTAGE_REGEXP."/", $value, $matches)) {
98 function parse($value) { argument
99 if ($value === 'inherit') {
103 $value = CSSBackgroundPosition::parse_in($value);
104 return new BackgroundPosition($value[0][0], $value[0][1],
105 $value[1][0], $value[1][1]);