Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View akella's full-sized avatar
🏠
Working from home

Yuri Artiukh akella

🏠
Working from home
View GitHub Profile
.row
+clr
@mixin g($n:1)
width: $n*240
float: left
+box
+respond-to(mobile)
width: $n*20%
.block
.bg-crop{
_filter : expression(
(runtimeStyle.filter == '') ? runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+currentStyle.backgroundImage.split('\"')[1]+', sizingMethod=crop)' : runtimeStyle.filter,
runtimeStyle.backgroundImage = 'none');
}
.bg-png-scale{
filter : expression(
(runtimeStyle.backgroundImage != 'none') ? runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+currentStyle.backgroundImage.split('\"')[1]+', sizingMethod=scale)' : runtimeStyle.filter,
runtimeStyle.backgroundImage = 'none');
}
.l-wrapper {
max-width: 1260px;
padding: 0 10px;
margin: 0 auto -525px;
position: relative;
min-height: 100%;
height: auto !important;
height: 100%;
@include respond-to(mob) {
width: 320px;
.l-wrapper {
max-width: 1260px;
padding: 0 10px;
margin: 0 auto -525px;
position: relative;
min-height: 100%;
height: auto !important;
height: 100%;
@include respond-to(mob) {
width: 320px;
.l-wrapper {
max-width: 1260px;
padding: 0 10px;
margin: 0 auto -525px;
position: relative;
min-height: 100%;
height: auto !important;
height: 100%;
@include respond-to(mob) {
@import "base";
// =======Sprites
// .whatever{
// @include sized-sprite($icons, badge_hit);
// @include retina{
// @include sized-sprite($icons, badge_new);
// }
// }
// =======animation setting example (set it anywehere)
// @include keyframes(rotate) {
@akella
akella / gist:4986096
Last active December 13, 2015 22:39
loop
a{
display: inline-block;
vertical-align: top;
@extend %hide-text;
//loop thru icons
@each $social in fb, vk, gp, rss{
&.social__#{$social}{
@include sized-sprite($icons, f-#{$social});
&:hover{@include sized-sprite($icons, f-#{$social}_hover);}
&:active{@include sized-sprite($icons, f-#{$social}_active);}
@import "base";
// =======Sprites
// .whatever{
// @include sized-sprite($icons, badge_hit);
// @include retina{
// @include sized-sprite($icons, badge_new);
// }
// }
// =======animation setting example (set it anywehere)
// @include keyframes(rotate) {
@viewport {
width: auto; // auto | device-width | length | percentage
// 'width' задаст сразу max и min-width.
max-width: auto;
min-width: auto;
// 'zoom' тоже что 'initial-scale' в meta
// Значения 1.0 или 100% означают что нет zoom.
zoom: auto; // auto | number | percentage
@akella
akella / gist:5016373
Created February 22, 2013 20:38
checking if it's touch device
if (!("ontouchstart" in document.documentElement)) {
document.documentElement.className += "no-touch";
}