mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
91 lines
No EOL
2.5 KiB
HTML
91 lines
No EOL
2.5 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
|
<meta charset="utf-8" />
|
|
<title>CSS Writing Modes: parsing text-combine-upright with valid values</title>
|
|
<link href="http://google.com/+MasatakaYakura" rel="author" title="Masataka Yakura" />
|
|
<link href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright" rel="help" />
|
|
<meta content="text-combine-upright supports `none`, `all`, `digits`, and `digits` followed by a digit in the range from 2 to 4." name="assert" />
|
|
<meta content="dom" name="flags" />
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<style>
|
|
#valid_none {
|
|
text-combine-upright: none;
|
|
}
|
|
|
|
#valid_all {
|
|
text-combine-upright: all;
|
|
}
|
|
|
|
#valid_initial {
|
|
text-combine-upright: initial;
|
|
}
|
|
|
|
#valid_inherit_outer {
|
|
text-combine-upright: all;
|
|
}
|
|
|
|
#valid_inherit_inner {
|
|
text-combine-upright: inherit;
|
|
}
|
|
|
|
#valid_unset_outer {
|
|
text-combine-upright: all;
|
|
}
|
|
|
|
#valid_unset_inner {
|
|
text-combine-upright: unset;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="valid_none"></div>
|
|
<div id="valid_all"></div>
|
|
|
|
<div id="valid_initial"></div>
|
|
|
|
<div id="valid_inherit_outer">
|
|
<div id="valid_inherit_inner"></div>
|
|
</div>
|
|
|
|
<div id="valid_unset_outer">
|
|
<div id="valid_unset_inner"></div>
|
|
</div>
|
|
|
|
<div id="log"></div>
|
|
|
|
<script>
|
|
var getComputedValueFor = function (id) {
|
|
var element = document.getElementById(id);
|
|
return window.getComputedStyle(element).textCombineUpright;
|
|
};
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_none'), 'none');
|
|
}, 'Computed value for `text-combine-upright: none` is `none`');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_all'), 'all');
|
|
}, 'Computed value for `text-combine-upright: all` is `all`');
|
|
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_initial'), 'none');
|
|
}, 'Computed value for `text-combine-upright: initial` is `none`');
|
|
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_inherit_outer'), 'all');
|
|
assert_equals(getComputedValueFor('valid_inherit_inner'), 'all');
|
|
}, 'Computed value for `text-combine-upright: inherit` is `all` which is inherited from the parent element');
|
|
|
|
test(function () {
|
|
assert_equals(getComputedValueFor('valid_unset_outer'), 'all');
|
|
assert_equals(getComputedValueFor('valid_unset_inner'), 'all');
|
|
}, 'Computed value for `text-combine-upright: unset` is `all` which is inherited from the parent element');
|
|
</script>
|
|
|
|
|
|
</body></html> |