Last active
April 25, 2023 13:01
-
-
Save dutchcelt/7654429ba2700e0ba7bbe58dec4b868a to your computer and use it in GitHub Desktop.
Force nested element to break out and use the width of the viewport
This file contains hidden or 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
| :host { | |
| container: host / inline-size; | |
| display: flex; | |
| /* force host to be the width of the viewport */ | |
| width: 100vw; | |
| margin-left: 50%; | |
| transform: translateX(-50%); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment