Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit a9a8e5f

Browse files
committed
Dist files.
1 parent 4e97f8d commit a9a8e5f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dist/picturefill.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ window.matchMedia || (window.matchMedia = function() {
114114
pf.getWidthFromLength = function( length ) {
115115
// If a length is specified and doesn’t contain a percentage, and it is greater than 0 or using `calc`, use it. Else, use the `100vw` default.
116116
length = length && length.indexOf( "%" ) > -1 === false && ( parseFloat( length ) > 0 || length.indexOf( "calc(" ) > -1 ) ? length : "100vw";
117+
117118
/**
118119
* If length is specified in `vw` units, use `%` instead since the div we’re measuring
119120
* is injected at the top of the document.
@@ -136,7 +137,7 @@ window.matchMedia || (window.matchMedia = function() {
136137

137138
if ( pf.lengthEl.offsetWidth <= 0 ) {
138139
// Something has gone wrong. `calc()` is in use and unsupported, most likely. Default to `100vw` (`100%`, for broader support.):
139-
pf.lengthEl.style.cssText = "width: 100%;";
140+
pf.lengthEl.style.width = doc.documentElement.offsetWidth + "px";
140141
}
141142

142143
return pf.lengthEl.offsetWidth;
@@ -413,15 +414,14 @@ window.matchMedia || (window.matchMedia = function() {
413414
// http://picture.responsiveimages.org/#the-img-element
414415
picImg.currentSrc = picImg.src;
415416

416-
var
417-
style = picImg.style || {},
418-
hasWebkitBackfaceVisibility = "webkitBackfaceVisibility" in style,
419-
currentZoom = style.zoom;
417+
var style = picImg.style || {},
418+
WebkitBackfaceVisibility = "webkitBackfaceVisibility" in style,
419+
currentZoom = style.zoom;
420420

421-
if (hasWebkitBackfaceVisibility) {
421+
if (WebkitBackfaceVisibility) { // See: https://github.com/scottjehl/picturefill/issues/332
422422
style.zoom = ".999";
423423

424-
hasWebkitBackfaceVisibility = picImg.offsetWidth;
424+
WebkitBackfaceVisibility = picImg.offsetWidth;
425425

426426
style.zoom = currentZoom;
427427
}

dist/picturefill.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)