1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibWeb: Fix off-by-one in CSS calc() "negate" operation

When negating a number, we should subtract it from 0, not 1. :^)
This commit is contained in:
Andreas Kling 2023-05-16 16:57:12 +02:00
parent 587c44cfbb
commit e81d4ca1ac
7 changed files with 38 additions and 12 deletions

View file

@ -0,0 +1,15 @@
<!doctype html><style>
body {
background: #444;
}
.container {
width: 100px;
background: green;
height: 50px;
}
.foo {
width: calc(100% - 1px);
background: black;
height: 50px;
}
</style><div class=container><div class=foo>

View file

@ -1,4 +1,7 @@
<style>
* {
font: 16px SerenitySans;
}
.grid-container {
display: grid;
background-color: lightsalmon;

View file

@ -1,4 +1,7 @@
<style>
* {
font: 16px SerenitySans;
}
.container {
display: grid;
background-color: lightsalmon;