Created
August 11, 2023 10:49
-
-
Save manufosela/c02fc3102d4ec29244dd45bdba20d3c6 to your computer and use it in GitHub Desktop.
Border radius nested elements using css variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parent { | |
--nested-radius: calc(var(--radius) - var(--padding)); | |
} | |
.nested { | |
border-radius: var(--nested-radius); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment