Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Move image replacement readme to doc folder and sym link for template…
Browse files Browse the repository at this point in the history
… README.md [#125]
  • Loading branch information
ebollens committed Oct 16, 2012
1 parent dbd78ab commit e35d33e
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions doc/modules/base/Image-Replacement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Base/Image Replacement

## Definition

This library provides utility classes for applying image replacement to an element.

## Usages

* Apply image replacement to an element

## Features

The `.ir` class can be added to an element to apply image replacement to that element.

Image replacement can be used to replace a text element within a document with an image
without placing an image directly in the markup. For example, if a document contained a
link to a Twitter account page using an image of the Twitter logo, it could be implemented
as follows:

```html
<a href="#"><img src="twitter-logo.png" alt="Twitter" /></a>
```

However, the `img` element does not add semantic value to the page in this example;
the image is simply a design implementation. Ideally, we would want to have the
following HTML:

```html
<a href="#">Twitter</a>
```

And then replace the inner text with an image. Image replacement allows for this.

To apply image replacement to an element, add the `.ir` class to the element and
then create a CSS declaration containing the width, height, and background image to
use in image replacement. For example:

```html
<h1>Website Title</h1>
```

```css
h1
{
background-image: url(main-logo.png);
height: 200px;
width: 500px;
}
```

## Responsive Considerations

None

0 comments on commit e35d33e

Please sign in to comment.