This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$solutions-null: ( | |
gutters: 0 | |
); | |
@include with-layout($solutions-null) { | |
.solutions__item{ | |
@include gallery(4 of 12); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Desktop First */ | |
/* Large screens ----------- */ | |
/*some CSS*/ | |
/* Desktops and laptops ----------- */ | |
@media only screen and (max-width : 1824px) {...} | |
/* iPads (landscape) ----------- */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin abstlycenter($w,$h){ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-left: -($w*0.5); | |
margin-top: -($h*0.5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Depency on Jquery + http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js [Must Include] | |
if (window.addEventListener) window.addEventListener('DOMMouseScroll', wheel, false); | |
window.onmousewheel = document.onmousewheel = wheel; | |
function wheel(event) { | |
var delta = 0; | |
if (event.wheelDelta) delta = event.wheelDelta / 120; | |
else if (event.detail) delta = -event.detail / 3; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bench(method, args, description) { | |
var start, duration, | |
max = Number.MIN_VALUE, | |
min = Number.MAX_VALUE, | |
average = 0; | |
for(var i = 0; i< 10; i++) { | |
start = Date.now(); | |
var index = method(args); | |
duration = Date.now() - start; | |
max = Math.max(max, duration); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div>Hello</div> | |
</div> | |
////////* 1st method *//////// | |
.container{ //Body can be used | |
display:flex; | |
height:100vh; | |
align-items: center; | |
justify-content: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
return( | |
<div> | |
<Component1 /> | |
{this.state.loading | |
? <Loader /> | |
: <Component2 producst={this.state.products /}> | |
} | |
</div> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @include triangle within a pseudo element and add positioning properties (ie. top, left) | |
* $direction: up, down, left, right | |
*/ | |
@mixin triangle($direction, $size: 6px, $color: #222){ | |
content: ''; | |
display: block; | |
position: absolute; | |
height: 0; width: 0; | |
@if ($direction == 'up'){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%currency { | |
position: relative; | |
&:before { | |
content: '$'; | |
position: relative; | |
left: 0; | |
} | |
} | |
.USD %currency:before { content: '$'; } | |
.EUR %currency:before { content: '\20AC'; } // must escape the html entities for each currency symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a relatively simple media query mixin that uses the beautiful Sass @content directive | |
and allows me to handle screen sizes inline with the rest of my style. This prevents a lot of | |
debugging headaches down the road. I set the dimensions of my media variables once, and then never have to deal with them again. | |
// Breakpoints for each query | |
$smartphone: 480px; | |
$tabletPortrait: 767px; | |
$tabletLandscape: 1024px; | |
$desktop: 1174px; |
OlderNewer