I have a box, to prevent it and its children from inheriting properties from outside world, I set all: initial;
on the box. But with this setting, I can't set other styles on it anymore.
<html>
<head>
<style>
.outer {
color: red;
}
.inner {
all: initial;
background: blue;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner">
<p>yes</p>
</div>
</div>
</body>
</html>
In the example above, what I expect is the background is blue but font color is black(initial)