Skip to content

Instantly share code, notes, and snippets.

View HelgaZhizhka's full-sized avatar
👁️‍🗨️

Olga Zhyzhka HelgaZhizhka

👁️‍🗨️
View GitHub Profile
@HelgaZhizhka
HelgaZhizhka / untitled
Created January 16, 2016 21:57
animation
/* Animations */
@-webkit-keyframes flash {
0% { background: rgba(255,255,255, 0); }
50% { background: rgba(255,255,255, .3); }
100% { background: rgba(255,255,255, 0); }
}
@-moz-keyframes flash {
0% { background: rgba(255,255,255, 0); }
@HelgaZhizhka
HelgaZhizhka / 0_reuse_code.js
Created February 1, 2016 13:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@HelgaZhizhka
HelgaZhizhka / calc-mixin.styl
Created March 15, 2016 11:02 — forked from joekukish/calc-mixin.styl
Stylus `calc()` mixin
// Adds the vendor prefixes for calc.
//
// Usage:
// width: calc('30% - 10px');
// If variables are needed they need to be specified this way.
// width: calc('40% \- %s' % (10px));
calc() {
// vendors to be used by this function
calc-vendors = webkit moz;
@HelgaZhizhka
HelgaZhizhka / jquery.touch.js
Created April 4, 2016 19:57 — forked from sj26/jquery.touch.js
Zepto touch for jQuery
(function($){
var touch = {}, touchTimeout;
function parentIfText(node){
return 'tagName' in node ? node : node.parentNode;
}
function swipeDirection(x1, x2, y1, y2){
var xDelta = Math.abs(x1 - x2), yDelta = Math.abs(y1 - y2);
if (xDelta >= yDelta) {
function cons(styles) {
if (!cons.initial) cons.initial = console;
var defaultStyles = 'font-family: Arial; font-size: 2em;';
styles = styles || defaultStyles;
console = {
log: function(str) { cons.initial.log('%c' + str, styles) }
}
.modal{
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
margin: auto;
}
box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.6);
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);
@HelgaZhizhka
HelgaZhizhka / css-fonts.css
Created August 8, 2017 16:16 — forked from gregorynicholas/css-fonts.css
CSS Fonts Schemes
p – balanced for paragraphs or body copy

t – balanced for headlines or titles
Arial, “Helvetica Neue”, Helvetica, sans-serif - p, t
Baskerville, “Times New Roman”, Times, serif - p
Baskerville, Times, “Times New Roman”, serif - t
Cambria, Georgia, Times, “Times New Roman”, serif - p, t
“Century Gothic”, “Apple Gothic”, sans-serif - p, t
@HelgaZhizhka
HelgaZhizhka / CSS: Fonts Stacks
Created August 8, 2017 16:16 — forked from zhilinskiy/CSS: Fonts Stacks
CSS: Fonts Stacks
/**
*
* Font Staks
*http://sixrevisions.com/css/css-typography-01/
*
* Wide sans serif: Verdana, Geneva
Narrow sans serif: Tahoma, Arial, Helvetica
Wide serif: Georgia, Utopia
Narrow serif: Times, Times New Roman
Monospace: Courier, Courier New, Lucida Console