Sha256: e06c3e1757cfba135ad48504b755c28efcdef979b0ffe088eca1cee90eaa97f5

Contents?: true

Size: 736 Bytes

Versions: 173

Compression:

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

173 entries across 170 versions & 4 rubygems

Version Path
govuk_publishing_components-27.14.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.14.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.13.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
dxw_govuk_frontend_rails-3.14.0 vendor/assets/stylesheets/tools/_image-url.scss
dxw_govuk_frontend_rails-3.13.1 vendor/assets/stylesheets/tools/_image-url.scss
dxw_govuk_frontend_rails-3.12.0 vendor/assets/stylesheets/tools/_image-url.scss
govuk_publishing_components-27.12.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.11.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.5 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.4 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.3 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.10.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.9.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.9.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.9.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.8.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.8.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-27.8.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss