Sha256: 05dce22b39c4528e3cec66d8f5f6c03fc1f8d87a272cb3c71af4273c25e9eaf4

Contents?: true

Size: 812 Bytes

Versions: 294

Compression:

Stored size: 812 Bytes

Contents

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

// Disable indentation linting in this file only
// sass-lint:disable indentation

/// 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

294 entries across 294 versions & 3 rubygems

Version Path
govuk_tech_docs-2.2.2 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-2.2.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-2.2.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-2.1.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-2.1.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_tech_docs-2.0.13 node_modules/govuk-frontend/govuk/tools/_image-url.scss
dxw_govuk_frontend_rails-3.6.0 vendor/assets/stylesheets/tools/_image-url.scss
dxw_govuk_frontend_rails-3.5.0 vendor/assets/stylesheets/tools/_image-url.scss
govuk_publishing_components-21.54.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.53.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.52.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.52.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.51.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.50.1 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.50.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.49.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.48.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.47.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.46.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss
govuk_publishing_components-21.45.0 node_modules/govuk-frontend/govuk/tools/_image-url.scss