Skip to content

Instantly share code, notes, and snippets.

Johan Bouveng bouveng

Block or report user

Report or block bouveng

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:0f6caf34b670cd712a18
// https://jsfiddle.net/hwt3fjL1/
@keyframes txt-load {
0% {content:".";}
50% {content:"..";}
}
body {
font-size: 30px;
}
View spellcheck-helper.css
*[class*="sss"]:after {
content: "warning: css class name typo?"
color: f00;
}
@bouveng
bouveng / spinner.rb
Created Oct 29, 2015 — forked from ellemenno/spinner.rb
ascii spinner
View spinner.rb
#!/usr/bin/env ruby
# encoding: UTF-8
@dot_cycle = ['','','','','','','','']
#braille random: 0x2800 - 0x28ff
@z_arrow = ['','','','','','','','']
@z_b = ['b','','q','']
@z_d = ['d','','p','']
@bouveng
bouveng / asciispinner.js
Created Oct 29, 2015 — forked from stefanocudini/asciispinner.js
ascii ajax spinner, jquery
View asciispinner.js
$(function() {
var spins = [
"←↖↑↗→↘↓↙",
"▁▃▄▅▆▇█▇▆▅▄▃",
"▉▊▋▌▍▎▏▎▍▌▋▊▉",
"▖▘▝▗",
"┤┘┴└├┌┬┐",
"◢◣◤◥",
"◰ ◳ ◲ ◱",
View shader-loop.less
@base: #03203a;
@shades: 15;
.shader-loop (@i) when (@i > 0) {
.strategy-chart svg path:nth-child(@{i}) {
@inc: @i;
fill: lighten(@base, @i * 100 / @shades);
}
.shader-loop(@i - 1);
@bouveng
bouveng / gist:6ea86457738355a9ab30
Last active Aug 29, 2015
A box model that makes sense
View gist:6ea86457738355a9ab30
This is my favorite CSS addition. Before the box-sizing property, if you had an element with
a defined width of 250px and added 25px padding (both left and right) to it, the actual width
would become 300px. This always seemed strange to me and when combined with making sites
responsive, it would really become a pain in the ass. Fortunately we can now change how the
box model calculates an element’s width and height. Using box-sizing: border-box will include
the element’s border and padding when calculating the height and width of an element. Using
our previous example, an element with box-sizing: border-box applied to it with a defined
width of 250px and padding of 25px will remain 250px wide.
To apply this behavior to all of your elements, include this at the top of your stylesheet:
You can’t perform that action at this time.