Quantization error for em values in Opera 7–9.2

Opera 7–9.2 shows a rough “quantization” error when a margin or a padding is expressed in em units and the value of the property is greater than (about) 20.47em. In these conditions the decimals are simply ignored. For example, all margins of 21em, 21.1em, … up to 21.9em are rendered exactly the same. This is not a simple rounding error.

Only margins and paddings seem affected, not other properties (like width, left, top, …) The problem is not present below the threshold value of 20.47em. The threshold is not dependent on the font-size, the “quantization” error always starts at 20.47em (of course, depending on font-size the error in pixels is different.) No other browser displays a similar behaviour (not even Opera 6.)

The same problem occurs when using ex, or percentage % measurement units, the threshold always being 20.47.

In the following example there is a series of green bars having an increasing margin-left with a 0.1em step. Check what happens (in Op7–9.2) when the value exceeds 20.47em: the margins do not increase regularly anymore, but in a “stepped” way.

Percentage tests:

The problem is fixed in Opera 9.5 (currently in beta), which works better also on the percentage tests, except the width one, where it still ignores all decimal figures (i.e.: width: x.y% is always equal to width: x%)

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

CSS tests home