Styling a Child Element Based on the Class of a Parent Element in SASS/SCSS
Feb 16, 2023
Have you ever needed to style a child element only if the parent element has a specific class?
An example of when I have needed to use this is to change the position of a search typeahead if the navigation is open.
Click on the pen below to see an example.