Sha256: 09f8c71ccb1bd978bc2226906bfb685029302428b204100be8113781b96341a8

Contents?: true

Size: 734 Bytes

Versions: 127

Compression:

Stored size: 734 Bytes

Contents

////
/// @group tools/assets
////

/// Image URL
///
/// If a custom image-url handler is defined ($govuk-image-url-function) then
/// it will be called, otherwise a url will be returned with the filename
/// appended to the image path.
///
/// @param {String} Filename for the image to load
/// @return {String} URL for the filename, wrapped in `url()`
/// @access public

@function govuk-image-url($filename) {
  $use-custom-function: variable-exists("govuk-image-url-function")
    and $govuk-image-url-function
    and function-exists($govuk-image-url-function);

  @if $use-custom-function {
    @return call(get-function($govuk-image-url-function), $filename);
  } @else {
    @return url($govuk-images-path + $filename);
  }
}

Version data entries

127 entries across 127 versions & 4 rubygems

Version Path
govuk_tech_docs-3.5.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-3.4.5 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.3.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.3.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.2.4 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.2.3 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.2.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.2.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.2.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.1.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.1.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-37.0.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-36.1.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-36.0.3 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-36.0.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-36.0.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-36.0.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-35.23.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-35.22.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-35.21.4 node_modules/govuk-frontend/govuk/tools/_image-url.scss