Sha256: 7cf6f391dddcea350260d4eccdd1687bf37d4fdc88f7f2bb633a0a5b1276e819

Contents?: true

Size: 806 Bytes

Versions: 2

Compression:

Stored size: 806 Bytes

Contents

## Functions

* [`_helpers.scss`](#helpers)

### <a id="helpers"></a>Helpers

The pixel-to-em or `pem` function returns an em value.

It sets a Sass variable, $base-font-size, to 16.

A value in em is defined as em = target/context.

#### Usage:

Here the default context is 16 ($base-font-size),
so there is no need to use a second argument.

```

.idsk-title {
  margin-top: pem(30);
}

Compiled css:

.idsk-title {
  margin-top: 1.875em;
}

```

The first argument will also accept pixel units.

```
.idsk-title {
  margin-top: pem(19px);
}

Compiled css:

.idsk-title {
  margin-top: 1.1875em;
}

```

If the context changes, use the second argument.

```
.idsk-title {
  font-size: 48px;
}

.idsk-title-child {
  margin-top: pem(15, 48);
}

Compiled css:

.idsk-title-child {
  margin-top: 0.3125em;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
idsk_frontend_toolkit-8.4.4 app/assets/docs/functions.md
idsk_frontend_toolkit-7.4.3 app/assets/docs/functions.md