'how to organize nested CSS selectors with brackets [closed]

there is any way that we can group CSS selectors with the same parent the way sass does? I am trying to write cleaner and more human-friendly CSS.so can I group the nested selectors without it giving an error?

.container{
    display:flex;
   .nav{
     align-self: center;
     }
}


css


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source