Sha256: 4cad48f9614846f909e101f3b2177ea61fdc505fc1fd5180942f5ffd053eaab1

Contents?: true

Size: 521 Bytes

Versions: 25

Compression:

Stored size: 521 Bytes

Contents

////
/// @group tools/unit-conversion
////

/// Convert pixels to rem
///
/// The $govuk-root-font-size (defined in settings/_typography-responsive.scss)
/// must be configured to match the font-size of your root (html) element
///
/// @param {Number} $value - Length in pixels
/// @return {Number} Length in rems
/// @access public

@function govuk-px-to-rem($value) {
  @if unitless($value) {
    $value: $value * 1px;
  }

  @return $value / $govuk-root-font-size * 1rem;
}

/*# sourceMappingURL=_px-to-rem.scss.map */

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
govuk_publishing_components-39.2.5 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.2.4 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.2.3 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.2.2 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.2.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.2.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.1.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-39.0.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-38.4.2 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-38.1.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-38.1.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-38.0.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-38.0.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.10.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.9.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.9.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.8.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.8.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.7.1 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss
govuk_publishing_components-37.7.0 node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss