Merge branch 'fixed-bg-performance'

pull/9/head
KostyaDanovsky 2016-04-11 17:35:35 +03:00
commit cc5cdde2fb
3 changed files with 18 additions and 3 deletions

View File

@ -11,7 +11,7 @@
/** @ngInject */
function baPanelBlurHelper($q) {
var res = $q.defer();
var computedStyle = getComputedStyle(document.body);
var computedStyle = getComputedStyle(document.body, ':before');
var image = new Image();
image.src = computedStyle.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi, '$2');
image.onerror = function() {

View File

@ -51,8 +51,19 @@
@mixin main-background() {
$mainBgUrl: $images-root + 'blur-bg.jpg';
background: url($mainBgUrl) no-repeat center center fixed;
background-size: cover;
&::before {
content: '';
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: url($mainBgUrl) no-repeat center center;
background-size: cover;
will-change: transform;
z-index: -1;
}
}
@mixin bg-translucent-dark($opacity) {

View File

@ -28,6 +28,10 @@ body.badmin-transparent {
.panel-heading {
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.12);
transform: translate3d(0,0,0);
}
.panel-body {
transform: translate3d(0,0,0);
}
}
.btn-default {