Skip to content

Instantly share code, notes, and snippets.

View zoxon's full-sized avatar

Zoxon zoxon

View GitHub Profile
@zoxon
zoxon / gist:7433bcf7ebffa27f17d8
Last active August 29, 2015 14:04
Stylus: User select none
-webkit-touch-callout none
-khtml-user-select none
user-select none
@zoxon
zoxon / gist:cba60d6dc0bcf8d6bcd3
Created September 21, 2014 05:34
Css: User select none
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
@zoxon
zoxon / gist:748d80a7dcb6730b0321
Created September 21, 2014 05:53
Stylus: IE7 hack selector
*:first-child+html &
@zoxon
zoxon / Save for web font-family
Last active September 30, 2015 12:32
Save css font stacks
---------------- Кирилица -------------------
font-family: "Arial Black", "Helvetica CY", "Nimbus Sans L" sans-serif;
font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
font-family: "Comic Sans MS", "Monaco CY", cursive;
font-family: "Courier New", "Nimbus Mono L", monospace;
font-family: Georgia, "Century Schoolbook L", Serif;
font-family: Impact, "Charcoal CY", sans-serif;
font-family: "Lucida Console", Monaco, monospace;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
@zoxon
zoxon / css-weight-vs-font-weight.txt
Created December 10, 2014 06:20
Css weight and equal font weight
|------------|-------------|
| CSS Weight | Font Weight |
|------------|-------------|
| 100 | Ultra Light |
| 200 | Thin |
| 300 | Light |
| 400 | Regular |
| 500 | Roman |
| 600 | Medium |
| 700 | SemiBold |
@zoxon
zoxon / css-bolder-lightter-cheatsheet.txt
Last active August 29, 2015 14:11
Css Bolder and Lighter cheatsheet
|-------------------|--------|---------|
| Исходное значение | bolder | lighter |
|-------------------|--------|---------|
| 100 | 400 | 100 |
| 200 | 400 | 100 |
| 300 | 400 | 100 |
| 400 | 700 | 100 |
| 500 | 700 | 100 |
| 600 | 900 | 400 |
| 700 | 900 | 400 |
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = LF
insert_final_newline = true
indent_style = tab
var formatPrice = function(x) {
var parts = x.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " ");
return parts.join(".");
};
var removeAllSpaces = function(str) {
return str.replace(/ /g,'');
};
/**
* Преобразует HEX-представление цвета в RGB.
* @param {String} hex
* @return {Array}
*/
var hex2Rgb = function(hex) {
if ('#' == hex.substr(0, 1)) {
hex = hex.substr(1);
}
if (3 == hex.length) {