Sha256: 57826e5d9b5b7e437416d1c170017434d0d5ed41d6dca1ac0ce84787437b5bc9

Contents?: true

Size: 424 Bytes

Versions: 32

Compression:

Stored size: 424 Bytes

Contents

// Convert pixels to em
@function em($value, $gem-context-font-size) {
  @warn "This function is deprecated and will be removed in the next major version release - use GOV.UK Frontend's `govuk-em()` instead.";

  @if (unitless($value)) {
    $value: $value * 1px;
  }
  @if (unitless($gem-context-font-size)) {
    $gem-context-font-size: $gem-context-font-size * 1px;
  }
  @return $value / $gem-context-font-size * 1em;
}

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
govuk_publishing_components-24.21.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.21.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.20.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.19.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.5 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.4 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.3 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.2 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.18.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.17.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.16.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.16.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.15.3 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.15.2 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.15.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.15.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.14.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.14.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-24.13.5 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss