Skip to content

Instantly share code, notes, and snippets.

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

Andrey Pelykh andreypelykh

🏠
Working from home
View GitHub Profile
$('#circles .open-modal').click(function(e){
e.stopImmediatePropagation();
$('#circles .modal:visible').fadeOut();
$(this).next('.modal').fadeIn();
});
$('#circles .close').click(function(){
$(this).parent('.modal').fadeOut();
})
$("body").click(function(e) {
.triangle{
width: 0;
height: 0;
border-bottom: 100px solid #000;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
}
.container {
line-height: 200px;
}
.block {
display: inline-block;
line-height: 1.2;
vertical-align: middle;
}

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@andreypelykh
andreypelykh / _select-reset.sass
Last active March 5, 2016 09:33
Отмена стандартного отображения select
=select-reset
-webkit-appearance: none
-moz-appearance: none
text-indent: 0.01px
text-overflow: ''
-ms-appearance: none
appearance: none!important
&::-ms-expand
display: none
@andreypelykh
andreypelykh / style.css
Created March 12, 2016 17:24
css padding hack
.wrapper {
width: 100px;
margin: 0 auto;
}
.box {
background: goldenrod;
margin-left: auto;
margin-right: auto;
padding-top: 50%;
$( '.fileContainer [type=file]' ).on( 'click', function updateFileName( event ){
var $input = $( this );
setTimeout( function delayResolution(){
$input.parent().text( $input.val().replace(/([^\\]*\\)*/,'') )
}, 0 )
} );
@andreypelykh
andreypelykh / gist:f34898feb9cbc72343f2ef9d48c8d948
Created March 25, 2017 19:42
show name of selected file good variant
$( '.fileContainer [type=file]' ).on( 'change', function updateFileName( event ){
var $input = $( this );
$input.parent().next('.fileName').text( $input.val().replace(/([^\\]*\\)*/,'') )
} );
@andreypelykh
andreypelykh / social-colors.sass
Created July 8, 2017 21:13
Social sites colors
/* SASS / Social Media Brand Colors */
$twitter: #00aced;
$facebook: #3b5998;
$googleplus: #dd4b39;
$pinterest: #cb2027;
$linkedin: #007bb6;
$youtube: #bb0000;
$vimeo: #1ab7ea;
$tumblr: #32506d;
@andreypelykh
andreypelykh / gist:75e9b99f0f7cef7cf99692b1d2a19c93
Created September 20, 2017 10:35
convert keywords to jasvascript array
const str: string;
str.split(',').map(e=> `'${e.trim()}'`).join(', ')