Skip to content

Instantly share code, notes, and snippets.

View xiel's full-sized avatar
🖖

Felix Leupold xiel

🖖
View GitHub Profile
@xiel
xiel / dabblet.css
Created November 8, 2012 22:06
Centered Element by xiel
/**
* Centered Element by xiel
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
@xiel
xiel / dabblet.css
Created November 13, 2012 09:44
Pseudo-Element Transition Webkit Bug
/*
Pseudo-Element Transition Webkit Bug
*/
a {
transition: 500ms;
position: relative;
border: 0 none;
border-radius: 5px;
padding: 10px 20px;
@xiel
xiel / dabblet.css
Created November 14, 2012 23:17
Pseudo-Element Transition Webkit Bug
/*
Pseudo-Element Transition Webkit Bug
*/
a,
a:after {
transition: 500ms; /* transition for both */
}
a {
position: relative;
@xiel
xiel / dabblet.css
Created November 14, 2012 23:24
Pseudo-Element Transition Webkit Bug Fix
/*
Pseudo-Element Transition Webkit Bug Fix
*/
a {
transition: 500ms; /* only the parent element needs the transition */
}
a {
position: relative;
border: 0 none;
@xiel
xiel / index.html
Created September 24, 2014 08:56
FileReader Error // source http://jsbin.com/yucavaxiyufi/6
<!DOCTYPE html>
<html>
<head>
<title>FileReader Error</title>
</head>
<body>
<form>
<input id="fileInput" type="file" accept-"image/*">
</form>
<div id="output"></div>
@xiel
xiel / Moving Line Buttons.markdown
Created August 27, 2015 16:41
Moving Line Buttons
@xiel
xiel / initial-value.js
Created November 13, 2015 11:06
initialValue attribute directive for angular
/** Get and Render initial value from HTML attr (data from BackEnd)
* license: MIT
*/
angular.module('bra.global.directive')
.directive('initialValue', ['$parse', function($parse) {
'use strict';
//trim input values (eg. textareas)
var removeIndent = function (str) {
@xiel
xiel / JSDateForDateFormatter.swift
Last active December 16, 2015 13:38
Transform JS Date String to NSDate or localizedString | supports JavaScript/ECMAScript Date Time String Format (simplification of the ISO 8601)
//
// NSDateFormatter extension
// Transform JS Date String to NSDate or localizedString
//
// Created by Felix Leupold on 16.12.15 © 2015 XIEL development.
// License: WTFPL / MIT
//
// Usage Examples:
// NSDateFormatter.dateFromJsDateString("2015-11-22T16:09:19.000Z");
// NSDateFormatter.localizedStringFromJsDateString("2015-11-22T16:09:19.000Z");
@xiel
xiel / useBreakpointMatch.ts
Last active June 2, 2022 18:50
useBreakpointMatch (breakpoint helper hook for material-ui)
import * as React from 'react'
import { useState, useLayoutEffect } from 'react'
import { useTheme } from '@material-ui/styles'
import { Theme } from '@material-ui/core'
import { Breakpoint } from '@material-ui/core/styles/createBreakpoints'
export type BreakpointVisiblityValues =
| 'xsOnly'
| 'smOnly'
| 'mdOnly'