/[suikacvs]/markup/html/whatpm/Whatpm/CSS/Cascade.pm
Suika

Diff of /markup/html/whatpm/Whatpm/CSS/Cascade.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by wakaba, Wed Jan 2 07:39:21 2008 UTC revision 1.8 by wakaba, Thu Jan 3 08:37:22 2008 UTC
# Line 10  use Scalar::Util qw/refaddr/; Line 10  use Scalar::Util qw/refaddr/;
10  sub new ($$) {  sub new ($$) {
11    my $self = bless {style_sheets => []}, shift;    my $self = bless {style_sheets => []}, shift;
12    $self->{document} = shift;    $self->{document} = shift;
13    
14      ## Device dependent font size parameters
15      my @scale = (3/5, 3/4, 8/9, 1, 6/5, 3/2, 2/1, 3/1); ## From css3-fonts
16      $self->{font_size}->[$_] = 16 * $scale[$_] for 0..$#scale;
17      ## TODO: Provide better default
18      $self->{get_smaller_font_size} = sub ($$) {
19        #my ($self, $original_px) = @_;
20        return $_[1] / 1.1;
21      };
22      ## TODO: Provide better default
23      $self->{get_larger_font_size} = sub ($$) {
24        #my ($self, $original_px) = @_;
25        return $_[1] * 1.1;
26      };
27    
28    return $self;    return $self;
29  } # new  } # new
30    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24