Sha256: 178e97cab706d75f2f5b0c4344e0cb7f5b3e1673b645601b78c220147a2bece1

Contents?: true

Size: 284 Bytes

Versions: 410

Compression:

Stored size: 284 Bytes

Contents

// Convert pixels to em
@function em($value, $gem-context-font-size) {
  @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

410 entries across 410 versions & 1 rubygems

Version Path
govuk_publishing_components-23.7.3 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.7.2 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.7.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.7.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.6.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.5.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.5.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.4.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.3.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.2.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.2.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.1.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-23.0.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.69.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.68.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.68.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.67.2 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.67.1 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.67.0 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
govuk_publishing_components-21.66.4 app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss