Skip to content

Commit 576e5e8

Browse files
committed
Fix cloning of 'em'
Closes #23.
1 parent b605a94 commit 576e5e8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Changes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{{$NEXT}}
2+
- Fix cloning of 'em' #23
23

34
0.9.6 2024-08-29T06:32:07+12:00
45
- Add FontConf 0.1.4+ :best($n) and :all options to
56
find-font() method
67
- Fix inheritance of font-size via inherit() method
78

89
0.9.5 2022-09-30T05:13:03+13:00
9-
- fix parsing of rgb/hsl alpha channel as a percentage
10+
- Fix parsing of rgb/hsl alpha channel as a percentage
1011

1112
0.9.4 2022-09-07T06:58:00+12:00
1213
Finesse tests & doc for CSS::Module 0.6.6, which supports:

lib/CSS/Properties.rakumod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class CSS::Properties:ver<0.9.6>:api<0.9> {
172172
// die "module {$!module.name} lacks an index";
173173
$!properties //= (%module-properties{$!module} //= []);
174174
}
175-
$!calc .= new: :css(self), :$units, :$viewport-width, :$viewport-height, :$reference-width, :$user-width;
175+
$!calc .= new: :css(self), :$units, :$viewport-width, :$viewport-height, :$reference-width, :$user-width, :$em;
176176

177177
my @style = .list with $declarations;
178178
@style.append: self!parse-style($_) with $style;

t/css-fonts.t

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 2;
3+
plan 3;
44
use CSS::Properties;
55

66
my $style = 'font:italic bold 10pt/12pt times-roman;';
@@ -36,4 +36,9 @@ subtest 'serialization' => {
3636
}
3737
}
3838

39+
subtest 'issue#23', {
40+
my CSS::Properties $css .= new: :style("font-size:.85em");
41+
is $css.clone.measure(:font-size), $css.measure(:font-size);
42+
}
43+
3944
done-testing;

0 commit comments

Comments
 (0)