Skip to content

Instantly share code, notes, and snippets.

View AnthonyDS's full-sized avatar
🛸

Anton Dikhtiaruk AnthonyDS

🛸
View GitHub Profile
@AnthonyDS
AnthonyDS / NameFile
Last active August 29, 2015 14:16
Gist Decsription
Hello world!
@AnthonyDS
AnthonyDS / JavaScript.js
Created July 7, 2016 04:48
Object.Keys(o)
Object.Keys(o) - Не поддерживает свойство или метод "key"
Error in IE 6 / IE 7 / IE 8
Supported in IE 9 / IE 10 / IE Edge
...
@AnthonyDS
AnthonyDS / Styles.sass
Created July 7, 2016 04:54
Passing Content Blocks to a Mixin
/*
* SCSS
*/
@mixin apply-to-ie6-only {
* html {
@content;
}
}
@include apply-to-ie6-only {
#logo {
@AnthonyDS
AnthonyDS / JavaScript.js
Created July 7, 2016 05:01
EcmaScript 7
EcmaScript Stages:
0) Strawman
1) Proposal
2) Draft
3) Candidate
4) Finished
JS bind(this)
ES7 {::this.onButtonClick} -> Только в stage 0
@AnthonyDS
AnthonyDS / MyReact.js
Created July 7, 2016 05:07
React.js - Удаление компонента из DOM
import React from 'react';
import ReactDOM from 'react-dom';
export default class MyComponent extends React.Component {
_destroy = (e) => {
// - Удаление компонента из DOM
ReactDOM.unmountComponentAtNode(document.body);
}
@AnthonyDS
AnthonyDS / Chrome-input.css
Last active July 26, 2016 08:35
WebKit Input CSS
input:not([type]),
input[type="email" i],
input[type="number" i],
input[type="password" i],
input[type="tel" i],
input[type="url" i],
input[type="text" i] {
padding: 1px 0px;
}
@AnthonyDS
AnthonyDS / SASS.sass
Last active October 1, 2016 00:30
Sugar
//
// padding, margin, font, ...
//
.class_name
//
// padding
//
// CSS var.1
padding-top: 21px
padding-left: 18px
@AnthonyDS
AnthonyDS / Notice.js
Last active September 24, 2016 01:08
//
// JavaScript Notice
//
// DPR (Device Pixel Ration)
console.log( window.devicePixelRatio );
//
@AnthonyDS
AnthonyDS / youtube.txt
Last active November 13, 2016 12:15
CSS обрезание текста
Однострочное обрезание текста:
text-overflow: ellipsis
overflow: hidden
width: 100px
white-space: nowrap
Как реализовано многострочное обрезание текста на youtube:
1) CSS3 Обрезание текста с троеточием в конце второй строки