Skip to content

Instantly share code, notes, and snippets.

@ThatGuySam
Created November 26, 2016 19:28
Show Gist options
  • Save ThatGuySam/95cbc52dbb762fde723b76b9ae12b353 to your computer and use it in GitHub Desktop.
Save ThatGuySam/95cbc52dbb762fde723b76b9ae12b353 to your computer and use it in GitHub Desktop.
Set background weight so focal point of photo stays in the picture on every device size (Responsive cropping)
.bg-weight {
&-north,
&-north > .vc_column-inner {
background-position-y: 0%;
}
&-north-some,
&-north-some > .vc_column-inner {
background-position-y: 20%;
}
&-sorth,
&-sorth > .vc_column-inner {
background-position-y: 50%;
}
&-south,
&-south > .vc_column-inner {
background-position-y: 100%;
}
&-center,
&-center > .vc_column-inner {
background-position-y: 50%;
background-position-x: 50%;
}
&-east,
&-east > .vc_column-inner {
background-position-x: 100%;
}
&-weast,
&-weast > .vc_column-inner {
background-position-x: 50%;
}
&-west,
&-west > .vc_column-inner {
background-position-x: 0%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment