0
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html {
color: red;
background: blue;
border: 1px solid white;
}
body {
color: yellow;
background: green;
all: inherit;
}
</style>
</head>
<body>
<h1>Esse é um título</h1>
<p>Esse é um parágrafo</p>
</body>
</html>
In the code example above the body
inherits all values of the properties of html
because the property all
is defined as inherit
.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html {
color: red;
background: blue;
border: 1px solid white;
}
body {
color: yellow;
background: green;
all: unset;
}
</style>
</head>
<body>
<h1>Esse é um título</h1>
<p>Esse é um parágrafo</p>
</body>
</html>
But when the value of the property is changed all
for unset
the font of h1
and p
is diminished because? in this case the all: unset
is behaving like inherit
and not initial
, right? then it would be whatever put all: inherit
or all: unset
, but this effect of the slightly smaller source I’m not understanding, someone explains to me what is happening?
They’re the same size to me
– Anderson Henrique
For me too, it’s all the same size, should be your impression there
– hugocsl
It’s not! really the sizes are different I’ll edit the answer and put a print.
– user159189
"answer" question.
– user159189
Cara tested in Chrome and Firefox, and there was no change in font size... Check if you’re not zooming in on the browser window, or if it’s not some other kind of accessibility setting etc
– hugocsl
Thank you for your help, if the problem isn’t happening on your computer should be in mine, I’ve tried it in several ways but it’s still the same, but I’ll try harder, because I don’t like having unsolved problems in my brain.
– user159189