Last active
March 24, 2022 08:31
-
-
Save MrSwed/0ad54e2db2ad5231cedb459761af4e56 to your computer and use it in GitHub Desktop.
Полный фон по ширине окна, не контейнера по центру
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
// /* fulW-pseudo | |
// https://gist.github.com/MrSwed/0ad54e2db2ad5231cedb459761af4e56 */ | |
// $mWidth:1142px; | |
@mixin fulW-pseudo($mW:$mWidth) { | |
content: ''; | |
position: absolute; | |
background: inherit; | |
top: 0; | |
bottom: 0; | |
left: -1vw; | |
right: -1vw; | |
z-index: -1; | |
@media screen and (min-width: $mW) { | |
left: calc(#{$mW} / 2 - 50vw); | |
right: calc(#{$mW} / 2 - 50vw); | |
} | |
} | |
%fulW-pseudo { | |
@include fulW-pseudo; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment