Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Maximilian Hoffmann maxhoffmann

👋
View GitHub Profile
View fullText.js
function fullText() {
var elements = [].slice.call(document.querySelectorAll('[data-full-text]'));
elements.forEach(function(element) {
var REGEX_NUMBER = /\d+/;
var REGEX_NO_NUMBER = /[^\d]+/;
element.style.display = "inline";
element.style.fontSize = '';
var width = element.getBoundingClientRect().width;
var containerWidth = element.parentNode.getBoundingClientRect().width;
var fontSize = getComputedStyle(element).fontSize;
View jsbin.pevaw.css
.scrollable {
overflow: auto;
}
.scrollableWrapper {
position: relative;
}
.scrollableWrapper:before {
content: '';
position: absolute;
top: 0;
@maxhoffmann
maxhoffmann / dabblet.css
Created Dec 20, 2011
CSS3 Border-Radius with Border - Circle Avatars
View dabblet.css
/**
* CSS3 Border-Radius with Border - Circle Avatars
*/
/* General Styles */
body { background: url(http://subtlepatterns.com/patterns/white_texture.png);
font: 100 14px sans-serif;
color: #444555; text-shadow: 0 2px white;
text-align: center;
View dabblet.css
/**
* CSS3 Macbook Keys
*/
body {
background: #eee;
text-align: center;
}
.threed {
perspective: 400;
perspective-origin: top;
@maxhoffmann
maxhoffmann / dabblet.css
Created Jan 5, 2012 — forked from LeaVerou/dabblet.css
Lined paper that follows the text
View dabblet.css
/**
* Lined paper that follows the text
* Support: Chrome, FF 3.6+, Saf 5.1+, Opera 11.50+, IE10
*/
/* Just decorative */
padding: 20px;
/* The font. Try changing font-size and see how the lines
@maxhoffmann
maxhoffmann / dabblet.css
Created Feb 2, 2012
CSS3 Windows Phone 7 UI
View dabblet.css
/**
* CSS3 Windows Phone 7 UI
*/
* { box-sizing: border-box; }
body {
margin: 0;
padding: 40px 10px;
background: black;
color: white;
font: 400 0.9em sans-serif;
View dabblet.css
/* opacity Beispiel */
div {
width: 300px;
height: 300px;
position: absolute;
}
#eins { background: red; }
#zwei {
View dabblet.css
/* CSS3 selectors */
ul { font-size: 1.5em; color: #999; }
li:last-child { color: red; }
li:nth-child(3n) { color: RoyalBlue; }
li[class^=test] { color: orange } /* starts with */
View dabblet.css
/* CSS3 Colors */
div {
height: 180px;
width: 180px;
margin: 10px;
padding: 10px;
float: left;
color: white;
font-size: 2em;
@maxhoffmann
maxhoffmann / dabblet.css
Created Mar 20, 2012
CSS3 Transformations
View dabblet.css
/* CSS3 Transformations */
div {
width: 200px;
height: 200px;
padding-top: 85px;
margin: 20px;
background: RoyalBlue;
box-sizing: border-box;
color: white;