25 |
if ($value) { |
if ($value) { |
26 |
return $prop_def->{serialize}->($self, $prop_def->{css}, $value->[0]); |
return $prop_def->{serialize}->($self, $prop_def->{css}, $value->[0]); |
27 |
} else { |
} else { |
28 |
return undef; |
return ""; |
29 |
} |
} |
|
## TODO: null? ""? ... if not set? |
|
30 |
## ISSUE: If one of shorthand component properties is !important? |
## ISSUE: If one of shorthand component properties is !important? |
31 |
}; |
}; |
32 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |
65 |
} else { |
} else { |
66 |
my $value = $$self->{$_}; |
my $value = $$self->{$_}; |
67 |
my $s = $prop_def->{serialize}->($self, $prop_def->{css}, $value->[0]); |
my $s = $prop_def->{serialize}->($self, $prop_def->{css}, $value->[0]); |
68 |
if (defined $s) { |
if (length $s) { |
69 |
$r .= ' ' . $prop_def->{css} . ': ' . $s; |
$r .= ' ' . $prop_def->{css} . ': ' . $s; |
70 |
$r .= ' !' . $value->[1] if defined $value->[1]; |
$r .= ' ! ' . $value->[1] if length $value->[1]; |
71 |
$r .= ";\n"; |
$r .= ";\n"; |
72 |
} |
} |
73 |
} |
} |
89 |
return '' unless defined $prop_def; |
return '' unless defined $prop_def; |
90 |
|
|
91 |
my $v = ${$_[0]}->{$prop_def->{key}}; |
my $v = ${$_[0]}->{$prop_def->{key}}; |
92 |
|
return $v ? $v->[1] : ''; |
|
return ((defined $v->[1] and $v->[1] eq 'important') ? 'important' : ''); |
|
93 |
} # get_property_priority |
} # get_property_priority |
94 |
|
|
95 |
## TODO: Implement other methods and attributes |
## TODO: Implement other methods and attributes |
123 |
if ($value) { |
if ($value) { |
124 |
return $prop_def->{serialize}->($self, $prop_def->{css}, $value); |
return $prop_def->{serialize}->($self, $prop_def->{css}, $value); |
125 |
} else { |
} else { |
126 |
return undef; |
return ""; |
127 |
} |
} |
|
## TODO: null? ""? ... if not set? |
|
128 |
}; |
}; |
129 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |
130 |
} else { |
} else { |
164 |
my $prop_value = $$self->{cascade}->get_computed_value |
my $prop_value = $$self->{cascade}->get_computed_value |
165 |
($$self->{element}, $prop_def->{css}); |
($$self->{element}, $prop_def->{css}); |
166 |
my $s = $prop_def->{serialize}->($self, $prop_def->{css}, $prop_value); |
my $s = $prop_def->{serialize}->($self, $prop_def->{css}, $prop_value); |
167 |
if (defined $s) { |
if (length $s) { |
168 |
$r .= ' ' . $prop_def->{css} . ': ' . $s; |
$r .= ' ' . $prop_def->{css} . ': ' . $s; |
169 |
$r .= ";\n"; |
$r .= ";\n"; |
170 |
} else { |
} else { |
181 |
|
|
182 |
## |CSSStyleDeclaration| methods |
## |CSSStyleDeclaration| methods |
183 |
|
|
184 |
sub get_property_priority ($$) { |
sub get_property_priority ($$) { '' } |
|
return ''; |
|
|
} # get_property_priority |
|
185 |
|
|
186 |
## TODO: members |
## TODO: members |
187 |
|
|