Skip to content

Instantly share code, notes, and snippets.

Mark Otto mdo

Block or report user

Report or block mdo

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
mdo /
Last active Sep 11, 2019
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

mdo / SassMeister-input.scss
Created Feb 4, 2016
Generated by
View SassMeister-input.scss
// ----
// libsass (v3.3.2)
// ----
// Declare a subset of colors for semantic/contextual usage
$theme-colors: (
"primary": blue,
"secondary": gray,
"success": green,
"info": teal,
mdo /
Last active Dec 20, 2016 — forked from benbalter/
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

mdo / scss-tests.scss
Last active Aug 29, 2015
You can create the same set of components with HTML and (S)CSS in a handful of ways. Here's how the same set of buttons looks with base and modifier classes, as well as extends and placeholders. The goal is to measure the output—the total number of selectors and declarations. Personally, I consider fewest selectors to be more optimal (for you an…
View scss-tests.scss
// Original
// Markup:
// <button class="button">Button</button>
// <button class="button button-primary">Button</button>
// <button class="button button-danger">Button</button>
// Total selectors: 6
// Total declarations: 19
View derp.html
<!-- Awful -->
<!-- Good -->
View submodule-bootstrap.bash
~/Sites/submodule-test git submodule add
Cloning into 'bootstrap'...
remote: Reusing existing pack: 56478, done.
remote: Counting objects: 3347, done.
remote: Compressing objects: 100% (1644/1644), done.
remote: Total 59825 (delta 1903), reused 3100 (delta 1703)
Receiving objects: 100% (59825/59825), 57.06 MiB | 845.00 KiB/s, done.
Resolving deltas: 100% (36265/36265), done.
Checking connectivity... done.
View ios-terminal.bash
# Option 1
alias ios='open /Applications/\'
# Option 2
alias ios='open -a iPhone\ Simulator'
View list-group.less
// Only necessary if you're putting `box-shadow` on the `.list-group`. This element has no `border-radius` to override.
.list-group {
border-radius: 10px; // Make it 1px more than the children `.list-group-item`s because math
// Override the defaults
.list-group-item:first-child {
border-top-left-radius: 9px;
border-top-right-radius: 9px;
mdo / index.html
Created Mar 6, 2014
Was asked on Twitter ( given the following code, does this make sense given the advice of using #noparents in CSS?
View index.html
<html id="daddy">
<div class="jumbotron">
<h1 class="text-danger">Heading</h1>
mdo / commas-spaces.css
Created Mar 3, 2014
Commas and spaces within `rgb()` and `rgba()` values.
View commas-spaces.css
.element {
color: rgba(255,255,255,.75);
text-shadow: 0 1px 3px rgba(0,0,0,.25);
.element {
color: rgba(255, 255, 255, .75);
text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
You can’t perform that action at this time.