Sha256: 29aaff12e7e70058b2f05078659e6d3d3a9afef4f8d33ac15807ed78d6db16d8

Contents?: true

Size: 522 Bytes

Versions: 67

Compression:

Stored size: 522 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

67 entries across 65 versions & 4 rubygems

Version Path
govuk_publishing_components-45.7.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.6.1 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.6.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.5.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.4.1 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.4.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.3.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_tech_docs-4.1.1 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.2.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.1.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-45.0.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
katalyst-govuk-formbuilder-1.13.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.11.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.10.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.9.1 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.9.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.8.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.7.1 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_publishing_components-44.7.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss
govuk_tech_docs-4.1.0 node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss