-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STENCIL-3891 Lazy load images, save space for images while loading
- Loading branch information
1 parent
68b06ae
commit e87dc94
Showing
39 changed files
with
348 additions
and
54 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,7 @@ | |
display: none; | ||
z-index: zIndex("low"); | ||
} | ||
|
||
.lazyload, .lazyloading { | ||
height:100%; | ||
} |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.brand-image-container { | ||
position: relative; | ||
max-width: get-width(stencilString('thumb_size')); | ||
|
||
img { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
margin: auto; | ||
} | ||
} | ||
|
||
.brand-image-container:after { | ||
content: ''; | ||
display: block; | ||
padding-bottom: get-padding(stencilString('thumb_size')); | ||
} | ||
|
||
.brand { | ||
.card-img-container { | ||
max-width: get-width(stencilString('brand_size')); | ||
} | ||
|
||
.card-img-container:after { | ||
padding-bottom: get-padding(stencilString('brand_size')); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,8 @@ | |
text-align: center; | ||
} | ||
} | ||
|
||
.card-figure:after { | ||
padding-bottom: get-padding(stencilString('brand_size')); | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// http://sassmeister.com/gist/1b4f2da5527830088e4d | ||
@function get-padding($size) { | ||
$list: str-split($size, 'x'); | ||
|
||
$width: to-number(nth($list, 1)); | ||
$height: to-number(nth($list, 2)); | ||
|
||
@return percentage($height/$width); | ||
} | ||
|
||
@function get-width($size) { | ||
$list: str-split($size, 'x'); | ||
|
||
@return nth($list, 1) + 'px'; | ||
} | ||
|
||
@function get-height($size) { | ||
$list: str-split($size, 'x'); | ||
|
||
@return nth($list, 2) + 'px'; | ||
} |
Oops, something went wrong.