<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS nesting</title>
</head>
<body>
<style>
.foo {
color: blue;
& .bar {
color: red;
}
}
</style>
<div class="foo">
<h1>foo</h1>
<div class="bar">
<h1>foo bar</h1>
</div>
</div>
<div class="bar">
<h1>bar</h1>
</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS nesting</title>
</head>
<body>
<style>
.foo {
color: blue;
& .bar {
color: red;
}
}
</style>
<div class="foo">
<h1>foo</h1>
<div class="bar">
<h1>foo bar</h1>
</div>
</div>
<div class="bar">
<h1>bar</h1>
</div>
</body>
</html>
https://developer.chrome.com/articles/css-nesting/
Native CSS에서도 nesting 된다고 해서 검색해봤더니 진짜 작동하는데 뭐임? 이거 써도 되는 거야?