Skip to content

Instantly share code, notes, and snippets.

View SergSlon's full-sized avatar
😀

Liamin Serhii SergSlon

😀
View GitHub Profile

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

<?php
const SPACING_X = 1;
const SPACING_Y = 0;
const JOINT_CHAR = '+';
const LINE_X_CHAR = '-';
const LINE_Y_CHAR = '|';
$table = array(
array(
<?php
// "!defined('determinator') == "include_once" for sneaky people.
if (!defined("determinator")){
function determinator_feof($file_pointer, &$now = NULL) {
// Assigning a value to $now in this function changes
// the value of whatever variable the calling function
// passed in. Functions with side effects... huzzah!
$now = microtime(true);
// Have we reached the end of the file?
@SergSlon
SergSlon / printf.js
Created September 2, 2013 10:30
printf analog in JavaScript From http://habrahabr.ru/post/192124/
String.prototype.format = function() {
var i = -1, args = arguments;
return this.replace(/#\{(.*?)\}/g, function(one, two) {
return (typeof args[0] == 'object')?args[0][two]:args[++i];
});
}
var thing = 'world!';
@SergSlon
SergSlon / _modal.scss
Created September 3, 2013 12:21
Равномерное распределение блоков
.container{
margin: 0 -10px 0 -10px;
.block{
width: 70px;
height: 70px;
float: left;
background-color: #b6b6bf;
display: inline-block;
margin: 10px;
element.style.width = getComputedStyle(element).width
element.style.transition = 'width .5s ease-in-out'
element.offsetWidth // force repaint
element.style.width = '300px'
var prevWidth = element.style.width
element.style.width = 'auto'
var endWidth = getComputedStyle(element).width
element.style.width = prevWidth
element.offsetWidth // force repaint
element.style.transition = 'width .5s ease-in-out'
element.style.width = endWidth
element.addEventListener('transitionend', function transitionEnd(event) {
if (event.propertyName == 'width') {
element.style.transition = ''
@SergSlon
SergSlon / .htaccess
Created September 7, 2013 15:22
Resource interpreted as Font but transferred with MIME type *
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
@SergSlon
SergSlon / An-Anonymous-Pen.markdown
Created September 12, 2013 10:26
A Pen by Anonasaurus Rex.