Skip to content

Instantly share code, notes, and snippets.

View gearmobile's full-sized avatar
🇷🇺
Working remotely

Valeriy Semenenko gearmobile

🇷🇺
Working remotely
View GitHub Profile
@gearmobile
gearmobile / Stylus Mixin for Placeholder
Last active January 9, 2016 08:14
Stylus Mixin for Placeholder
placeholder()
&::-webkit-input-placeholder
{block}
&::-moz-placeholder
{block}
&:-moz-placeholder
{block}
&:-ms-input-placeholder
{block}
@gearmobile
gearmobile / Stylus Mixin Squish Text
Created January 9, 2016 08:13
Stylus Mixin Squish Text
squish-text()
font 0/0 serif
text-shadow none
color transparent
@gearmobile
gearmobile / Stylus Mixin Equal Width and Height
Created January 9, 2016 08:16
Stylus Mixin Equal Width and Height
size($width, $height = $width)
width $width
height $height
@gearmobile
gearmobile / Simple Bounce Animation Header Button
Created January 9, 2016 11:40
Simple Bounce Animation Header Button
@keyframes bounceButton
0%, 100%
transform translate(-50%, 0%)
50%
transform translate(-50%, -50%)
60%
transform translate(-50%, 50%)
@gearmobile
gearmobile / How import module
Created February 19, 2016 17:01
How import module
import 'module' – импортировать файл ./node_modules/module/<main>, где <main> - содержимое поля "main" в package.json модуля.
import 'module/file.js' – импортировать файл ./node_modules/module/file.js
@gearmobile
gearmobile / Stylus Mixin Static Retina Image
Last active February 29, 2016 16:45
Stylus Mixin Static Retina Image
retinaBackground($image, $ext = 'png') {
// pixel ratio of 1; background size is 100% (or 100px image)
background-image url('../images/' + $image + '.' + $ext)
// pixel ratio of 2; background-size is 200% (or 200px image)
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
background-image url('../images/' + $image + '@2x.' + $ext)
}
}
@gearmobile
gearmobile / Smooth Scroll Links
Created February 29, 2016 15:00
Smooth Scroll Links
@gearmobile
gearmobile / Hide placeholder on focus
Last active March 7, 2016 08:08
Hide placeholder on focus
[placeholder]:focus::placeholder
color transparent
@gearmobile
gearmobile / Disable resize and allow user select
Created March 7, 2016 08:10
Disable resize and allow user select
input
textarea
resize none
user-select text
@gearmobile
gearmobile / Calc - width by the height
Created March 9, 2016 08:48
Calc - the calculation of the width by the height
height 100%
width calc(4/3*100%)