mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 08:57:34 +09:00
Fix CSS border rounding and currentcolor clipping
This commit is contained in:
parent
2bd01e4236
commit
956b9caced
1 changed files with 29 additions and 0 deletions
|
|
@ -42,8 +42,37 @@ function checkWidth(property, setupProperty, setupValue) {
|
|||
});
|
||||
}
|
||||
|
||||
function checkOffset(property) {
|
||||
tests.forEach(function(test) {
|
||||
var specified = test[0];
|
||||
var expected = test[1];
|
||||
var div = document.createElement("div");
|
||||
div.style[property] = specified;
|
||||
display.appendChild(div);
|
||||
|
||||
is(document.defaultView.getComputedStyle(div, "")[property], expected,
|
||||
property + " computes " + specified + " as " + expected);
|
||||
|
||||
display.removeChild(div);
|
||||
});
|
||||
|
||||
tests.forEach(function(test) {
|
||||
var specified = test[0];
|
||||
var expected = test[0] == "0px" ? "0px" : "-" + test[1];
|
||||
var div = document.createElement("div");
|
||||
div.style[property] = "-" + specified;
|
||||
display.appendChild(div);
|
||||
|
||||
is(document.defaultView.getComputedStyle(div, "")[property], expected,
|
||||
property + " computes -" + specified + " as " + expected);
|
||||
|
||||
display.removeChild(div);
|
||||
});
|
||||
}
|
||||
|
||||
checkWidth("borderWidth", "borderStyle", "solid");
|
||||
checkWidth("outlineWidth", "outlineStyle", "solid");
|
||||
checkOffset("outlineOffset");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue