Skip to content

Instantly share code, notes, and snippets.

View jensgro's full-sized avatar

Jens Grochtdreis jensgro

View GitHub Profile
@jensgro
jensgro / dabblet.css
Created December 18, 2015 20:31 — forked from gunnarbittersmann/dabblet.css
heading decorated
/**
* heading decorated
*/
html
{
height: 100%;
background: linear-gradient(
to right bottom,
yellow,
@jensgro
jensgro / dabblet.css
Last active August 28, 2015 14:45 — forked from anonymous/dabblet.css
keyboard order and flexbox ordering
/**
* keyboard order and flexbox ordering
*/
nav {
display: flex;
padding: 20px;
}
a:nth-of-type(2) {
order: -1;
@jensgro
jensgro / dabblet.css
Created May 22, 2015 12:55 — forked from csssecrets/dabblet.css
Scrolling hints
/**
* Scrolling hints
*/
ul {
display: inline-block;
overflow: auto;
width: 7.2em;
height: 7em;
border: 1px solid silver;
@jensgro
jensgro / SassMeister-input.scss
Created April 13, 2015 16:11
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
%placeholder {
foo: bar;
&:first-child {
first: child;
}
@jensgro
jensgro / SassMeister-input.scss
Created April 13, 2015 15:54
Linear Gradient with Compass (including IE8)
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@import "compass";
$experimental-support-for-svg: true;
.test {
@include background(linear-gradient(top, #fd8700, #a20000));
@jensgro
jensgro / SassMeister-input.scss
Created April 8, 2015 18:04
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
.module {
background: red;
&__element {
background: #cecece;
&--modifier {
@jensgro
jensgro / dabblet.css
Created March 15, 2015 14:42
Basic border-image demo
/**
* Basic border-image demo
*/
@jensgro
jensgro / dabblet.css
Created March 15, 2015 14:13
Basic border-image demo
/**
* Basic border-image demo
*/
div {
border: 40px solid transparent;
border-image: 33.334% url('data:image/svg+xml,<svg xmlns="http:%2F%2Fwww.w3.org%2F2000%2Fsvg" width="30" height="30"> \
<circle cx="5" cy="5" r="5" fill="%23ab4"%2F><circle cx="15" cy="5" r="5" fill=" %23655"%2F> \
<circle cx="25" cy="5" r="5" fill="%23e07"%2F><circle cx="5" cy="15" r="5" fill=" %23655"%2F> \
<circle cx="15" cy="15" r="5" fill="hsl(15, 25%, 75%)"%2F> \

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {