Skip to content

Instantly share code, notes, and snippets.

View DaveOrDead's full-sized avatar

Dave DaveOrDead

View GitHub Profile
@DaveOrDead
DaveOrDead / bem_state_hooks.html
Last active December 5, 2015 07:58
BEM state hooks
<div class="card is-active">
[ ... ]
</div>
or
<div class="card card--is-active">
[ ... ]
</div>
@DaveOrDead
DaveOrDead / bem_grid_cards.html
Last active December 7, 2015 23:21
BEM grid of cards
<ul class="grid">
<li class="grid__item">
<div class="card">
<div class="card__header">
[ ... ]
</div>
<div class="card__body">
[ ... ]
</div>
</div>
@DaveOrDead
DaveOrDead / bem_mixies_card_button.html
Last active December 12, 2015 11:58
BEM Mixies, card + button
<div class="card">
<div class="card__header">
<h2 class="card__title">Title text here</h2>
</div>
<div class="card__body">
<img class="card__img" src="some-img.png">
@DaveOrDead
DaveOrDead / bem_with_button.html
Created December 5, 2015 07:18
BEM with a button
<div class="card">
<div class="card__header">
<h2 class="card__title">Title text here</h2>
</div>
<div class="card__body">
<img class="card__img" src="some-img.png">
@DaveOrDead
DaveOrDead / bem_button.html
Created December 5, 2015 07:16
bem button example
<button class="button button--primary">Click me!</button>
@DaveOrDead
DaveOrDead / bem_card_bad.html
Last active December 14, 2015 03:48
BEM card bad example
<div class="card">
<div class="card__header">
<h2 class="card__header__title">Title text here</h2>
</div>
<div class="card__body">
<img class="card__body__img" src="some-img.png">
@DaveOrDead
DaveOrDead / bem_card_good.html
Last active December 5, 2015 08:46
BEM card
<div class="card">
<div class="card__header">
<h2 class="card__title">Title text here</h2>
</div>
<div class="card__body">
<img class="card__img" src="some-img.png">
@DaveOrDead
DaveOrDead / robot.js
Last active December 5, 2015 06:43
Fight Robot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);