<!DOCTYPE HTML>
<html class="focus-within">
<head>
<style>
    * {
        border: none;
    }
    .focus-within {
        border: 2px solid green;
    }
</style>
</head>
<body class="focus-within">
    <div class="focus-within">
        <input form="form" id="input" autofocus  class="focus-within">
    </div>
    <div>
        Foo
    </div>
    <div>
        Bar
    </div>
</body>
</html>
