Skip to content

Instantly share code, notes, and snippets.

View drublic's full-sized avatar
🌐
Remote by default

Hans Reinl drublic

🌐
Remote by default
View GitHub Profile
@drublic
drublic / dabblet.css
Created January 18, 2013 14:53
Chrome Canary bug: box-shadow on pseudo-elements
/**
* Chrome Canary bug: box-shadow on pseudo-elements
*/
p:after {
content: '';
box-shadow: 0 0 10px green;
}
@drublic
drublic / rem-fallback.less
Last active March 28, 2020 23:57
Fallback rem-mixin in Sass and LESS
@main-font-size: 16px;
.x-rem (@property, @value) {
// This is a workaround, inspired by https://github.com/borodean/less-properties
@px-fallback: @value * @main-font-size;
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`;
-: ~`(function () { return ';@{property}: @{value}rem'; }())`;
}
@drublic
drublic / dabblet.css
Created December 10, 2012 11:31
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.widget-area {
margin: 50px -10px 0;
overflow: hidden;
}
.homewidgets {
@drublic
drublic / dabblet.css
Created December 9, 2012 19:37
Box Model
/**
* Box Model
*/
p {
width: 300px;
}
@drublic
drublic / dabblet.css
Created December 9, 2012 19:37
New Flexbox - Testing
/**
* New Flexbox - Testing
*/
.parent {
padding: 10px;
background: orange;
width: 300px;
display: flex;
@drublic
drublic / dabblet.css
Created October 31, 2012 17:34
IE8: Pseudo-elements with images
/**
* IE8: Pseudo-elements with images
*/
a {
position: relative;
display: block;
}
a:after {
@drublic
drublic / dabblet.css
Created October 31, 2012 17:32
Testing mailto forms
/**
* Testing mailto forms
*/
@drublic
drublic / dabblet.css
Created October 24, 2012 07:22 — forked from LeaVerou/dabblet.css
Testing mailto forms
/**
* Testing mailto forms
*/
@drublic
drublic / dabblet.css
Created October 18, 2012 14:16
Horizonal centering with position: absolute;
/**
* Horizonal centering with position: absolute;
*/
.navigation > li {
position: relative;
display: inline;
background: #eee;
margin: 0 10px;
padding: 10px;
@drublic
drublic / dabblet.css
Created October 15, 2012 23:20
Testing CSS' @media as in CSS Conditional Rules
/**
* Testing CSS' @media as in CSS Conditional Rules
*/
body {
background: red;
}
@media screen, (min-width: 20000px) {
body {