start new:
tmux
start new with session name:
tmux new -s myname
This mixin depends on Modernizr and creates a bit more work for you when creating images for your site, but it’s really worth it in the end. | |
You need one .svg file, that will serve as the default background image. You’ll also need a regular .png that serves as a fallback for non-svg-supporting browsers. And last you need a twice as large .png as a second fallback to retina screens. | |
All in all you need this: | |
* pattern.svg | |
* pattern.png | |
* pattern@2x.png | |
$image-path: '../img' !default; | |
$fallback-extension: 'png' !default; | |
$retina-suffix: '@2x'; |
%clearfix { | |
*zoom: 1; | |
&:before, &:after { | |
content: ' '; | |
display: table; | |
} | |
&:after { | |
clear: both; |
//Without gutter | |
// width: calc(100% / total_number_of_columns * columns ) | |
//With gutter | |
// width: calc((100% / total_number_of_columns * columns) - the gutter) | |
$columns: 12; | |
$gutter_width: 5%; | |
$total_width: 100%; | |
@function grid-width($cols, $has-gutter:false) { |
// Usage | |
//HTML | |
<a href="#" class="menu-button" id="menuButton"> | |
<span class="burger-icon"></span> | |
</a> | |
<script> | |
var menuButton = document.getElementById('menuButton'); | |
menuButton.addEventListener('click', function (e) { |
export default class PriceRangeInput extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
currentRange: { | |
min: '', | |
max: '' | |
} | |
} |
https://habrahabr.ru/post/239863/ | |
Хорошим примером использования является возврат ссылки на функцию. Мы можем возвращать наружу разные ссылки, которые делают возможным доступ к тому, что было определено внутри. | |
var sayHello = function (name) { | |
var text = 'Hello, ' + name; | |
return function () { | |
console.log(text); | |
}; | |
}; |
$map-portifolio: ( | |
gutters: 0 | |
); | |
@include with-layout($map-portifolio) { | |
.item{ | |
@include gallery(3 of 12); | |
} | |
} |
/* | |
SPAN-RESPONSIVE | |
Create responsive, mobile first gallery-like grids using Susy. | |
Columns have the same size, only the amount of columns in a row change. | |
Accepts a single argument as a list. | |
$example-layouts: 2 30em, 4 50em, 8 60em; |
//for any elem!! | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); |