Skip to content

Instantly share code, notes, and snippets.

View mishelen's full-sized avatar

Mikhail Hozhy mishelen

  • Krakow, Poland
  • 04:57 (UTC +02:00)
View GitHub Profile
@mishelen
mishelen / absolute.css
Created March 6, 2014 21:10
Способы центрирования
/*actually (spoiler alert!) absolute centering
only requires a declared height*
and these styles:*/
.Center-Container {
position: relative;
}
.Absolute-Center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
@mishelen
mishelen / input_not(buttons)(atr).css
Created March 7, 2014 11:05
Хукинг всех не-кнопок по атрибутам
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
@mishelen
mishelen / media_min-reoslution.css
Created March 7, 2014 20:19
From http://coding.smashingmagazine.com/2012/10/15/css-qa-4/ Тут вообще много интересного
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@mishelen
mishelen / hyphens.css
Created March 7, 2014 22:17
перенос контента
.prevent-text-breakouts {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
@mishelen
mishelen / flat-rgb.sass
Created March 13, 2014 10:29
flat colors value
$turquoise: rgb(26, 188, 156)
$emerland: rgb(46, 204, 113)
$peter-river: rgb(52, 152, 219)
$amethyst: rgb(155, 89, 182)
$wet-asphalt: rgb(52, 73, 94)
$green-sea: rgb(22, 160, 133)
$nephritis: rgb(39, 174, 96)
$belize-hole: rgb(41, 128, 185)
$wisteria: rgb(142, 68, 173)
$midnight-blue: rgb(44, 62, 80)
@mishelen
mishelen / unicode_ranges
Created May 21, 2014 09:51
диапазоны для генерации Unicode Ranges fontsquirrel.com
Заголовки 152 символа:
0410-044f,0030-0039,0020-002e,0061-007a,0041-005a,003a,003b,003f,0040,0085,0088,0096,0097,00a7,00ab,00bb,2116
! " # $ % & ' ( ) * + , - . 0 1 2 3 4 5 6 7 8 9 : ; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z … ˆ – — § « » А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я №
Основной текст 176 символов
0020-007a,0410-044f,0401,0451,2116,0082,0084,0085,0091-0097,00a7,00a9,00ab,00ae,00b7,00bb,0088,00
@mixin word-wrap() {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
@mixin ellipsis() {
overflow: hidden;
white-space: nowrap;
@mishelen
mishelen / counters(args).css
Last active August 29, 2015 14:05
Счетчик средствами CSS, взамен мало кастомизируемого <ol>. From https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Counters
/*Один счетчик поуровнево, разделитель второй аргумент*/
ol {
counter-reset: item;
list-style: none;
}
li {
display: block;
}
li:before {
counter-increment: item;
@mishelen
mishelen / nooptimizes.svg
Created August 12, 2014 17:20
Что нужно и можно легко удалять из SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mishelen
mishelen / vert-rhythm.scss
Last active August 29, 2015 14:05
градиент для вертикального ритма
.container {
background-image: linear-gradient(rgba(0, 0, 0, 0.2) 0%, transparent 3%, transparent 100%) !important;
background-position: left top;
background-repeat: repeat;
background-size: $line-height $line-height;
}