## Pen Settings

### CSS

#### Vendor Prefixing

Any URL's added here will be added as `<link>`s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

### JavaScript

#### JavaScript Preprocessor

Babel includes JSX processing.

Any URL's added here will be added as `<script>`s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

### Packages

Search for and use JavaScript packages from npm here. By selecting a package, an `import` statement will be added to the top of the JavaScript editor for this package.

### Behavior

#### Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

#### Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

#### Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

## HTML

```              ```
<canvas data-scale="16" id="heart"></canvas>
```
```
!

## CSS

```              ```
body {
background: #ddd;
}
```
```
!

## JS

```              ```
var canvas = \$('canvas#heart'),
ctx = canvas.get(0).getContext('2d'),
t = 'transparent', r = '#f66', w = 'fff', b = '#000',

imgData = [
t, t, t, t, t, t, t, t, t, t, t, t, t,
t, t, b, b, b, t, t, t, b, b, b, t, t,
t, b, r, r, r, b, t, b, r, r, r, b, t,
b, r, w, w, r, r, b, r, r, r, r, r, b,
b, r, w, r, r, r, r, r, r, r, r, r, b,
b, r, r, r, r, r, r, r, r, r, r, r, b,
t, b, r, r, r, r, r, r, r, r, r, b, t,
t, t, b, r, r, r, r, r, r, r, b, t, t,
t, t, t, b, r, r, r, r, r, b, t, t, t,
t, t, t, t, b, r, r, r, b, t, t, t, t,
t, t, t, t, t, b, r, b, t, t, t, t, t,
t, t, t, t, t, t, b, t, t, t, t, t, t,
t, t, t, t, t, t, t, t, t, t, t, t, t,
],

x = 0 , y = 0, w = 13,
s = Number(canvas.attr('data-scale'));

canvas.attr('width', s * w);
canvas.attr('height', s * w);

for (var i = 0; i < imgData.length; i++) {
if(x == w * s) { x = 0; y += s; }
ctx.fillStyle = imgData[i];
ctx.fillRect(x, y, s, s);
x += s;
}

console.log(w, s);
```
```
!
999px