mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Fix the rem unit.
(I think it’s never worked in over a year since it was implemented…)
This commit is contained in:
parent
78b16bcc1d
commit
54790d0ae5
3 changed files with 4 additions and 1 deletions
|
@ -6847,7 +6847,7 @@ pub fn cascade(viewport_size: Size2D<Au>,
|
||||||
}
|
}
|
||||||
|
|
||||||
if is_root_element {
|
if is_root_element {
|
||||||
context.root_font_size = context.font_size;
|
style.root_font_size = context.font_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if seen.get_font_style() || seen.get_font_weight() || seen.get_font_stretch() ||
|
if seen.get_font_style() || seen.get_font_weight() || seen.get_font_stretch() ||
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html style="font-size: 7px">
|
||||||
<title>font-size (issues #1435, #3417)</title>
|
<title>font-size (issues #1435, #3417)</title>
|
||||||
<link rel=match href=font_size_ref.html>
|
<link rel=match href=font_size_ref.html>
|
||||||
<style>p { margin: .5em }</style>
|
<style>p { margin: .5em }</style>
|
||||||
<body style="font-size: 20px">
|
<body style="font-size: 20px">
|
||||||
<p style="font-size: 24pt">24pt is 32px.
|
<p style="font-size: 24pt">24pt is 32px.
|
||||||
<p style="font-size: 2em">2em is 40px.
|
<p style="font-size: 2em">2em is 40px.
|
||||||
|
<p style="font-size: 2rem">2rem is 14px.
|
||||||
<p style="font-size: 200%">200% is 40px.
|
<p style="font-size: 200%">200% is 40px.
|
||||||
<p style="font-size: smaller">smaller is 17px.
|
<p style="font-size: smaller">smaller is 17px.
|
||||||
<p style="font-size: larger">larger is 24px.
|
<p style="font-size: larger">larger is 24px.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<body>
|
<body>
|
||||||
<p style="font-size: 32px">24pt is 32px.
|
<p style="font-size: 32px">24pt is 32px.
|
||||||
<p style="font-size: 40px">2em is 40px.
|
<p style="font-size: 40px">2em is 40px.
|
||||||
|
<p style="font-size: 14px">2rem is 14px.
|
||||||
<p style="font-size: 40px">200% is 40px.
|
<p style="font-size: 40px">200% is 40px.
|
||||||
<p style="font-size: 17px">smaller is 17px.
|
<p style="font-size: 17px">smaller is 17px.
|
||||||
<p style="font-size: 24px">larger is 24px.
|
<p style="font-size: 24px">larger is 24px.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue