Skip to content

Instantly share code, notes, and snippets.

View fiximportant's full-sized avatar

igor fiximportant

View GitHub Profile
@fiximportant
fiximportant / index.html
Last active May 18, 2017 16:40
Vertical Align - INB
<style>
.father {
height: 100vh;
}
.father:before {
content: '';
width: 0;
height: 100%;
display: inline-block;
vertical-align: middle;
@fiximportant
fiximportant / style.css
Last active February 21, 2018 07:45
Calc - CrossBrowser
width: -webkit-calc(100% / N - Npx);
width: -moz-calc(100% / N - Npx);
width: calc(100% / N - Npx);
@fiximportant
fiximportant / style.css
Last active February 22, 2018 19:43
Transform - CrossBrowser
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
@fiximportant
fiximportant / init.js
Created February 17, 2017 10:40
Плавающий блок в пределах родителя
$(document).ready(function(){
var fatherWrap = $('.column__center'), //Родитель
childBlock = $('.js-left-menu'), //Ребенок который ездит в пределах родителя
startPosition = fatherWrap.offset().top, //Позиция с которой начинается скролл ребенка
stopPosition = $('.js-left-menu-stop').offset().top - childBlock.outerHeight(); //DIV на котором, нужно остановиться
$(document).scroll(function () {
var y = $(this).scrollTop()
if (y > startPosition) {
@fiximportant
fiximportant / index.html
Last active October 25, 2017 20:22
Set Emmet - Edge
<div class="row">
<div class="col-sm-12 col-sm-4 col-md-4">
<!-- begin b-price -->
<div class="b-price">
<div class="price__row">
<div class="price__pic"><img src="/images/design/price-1.jpg" alt=""></div>
<div class="price__title">Баня «Крестьянская изба»</div>
<div class="price__box">
<div class="price__item">
<div class="price__text">
@fiximportant
fiximportant / index.html
Created April 24, 2017 08:44
Twig - Count
{{ loop.index }}
@fiximportant
fiximportant / index.html
Created April 24, 2017 10:26
Clear style, href
style="[^"]+"
@fiximportant
fiximportant / style.css
Last active March 1, 2018 15:06
Columns
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: 15px;
-moz-column-gap: 15px;
column-gap: 15px;
/*items*/
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
@fiximportant
fiximportant / style.css
Last active February 21, 2018 07:46
Transition - CrossBrowser
-webkit-transition-property: top;
transition-property: top;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
@fiximportant
fiximportant / callback.html
Last active October 23, 2017 06:00
CallBack
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.b-callback {
position: fixed;
bottom: 10%; right: 5%;
z-index: 999;