Robust Icons

This is a pattern for a robust set of icons that can be used inline, appended or prepended to most elements on the page.

It's also easy to extend. If you follow the naming conventions only a background image property is required to make a new icon.

Tomato left

Tomato right

Turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke.

Inline tomato

Veggies es bonus tomato vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.

Bonus responsive tomato!

Resize the viewport to change the size of the tomato.

Usage

Inline:

<span class="icon icon-{icon-name}"></span>

Prepend:

<div class="icon-left-{icon-name}"></div>

Append:

<div class="icon-right-{icon-name}"></div>

Size modifiers:

<span class="icon icon-{icon-name} icon-small"></span>
<div class="icon-right-{icon-name} icon-large"></div>
<span class="icon icon-{icon-name} icon-responsive"></span>

* This technique works equally well with other vegtables or even non-vegetable themed icons.