Sha256: 515a3df60583af50cc6f4b318f54a30acc49f12ca2d98f208a13606ba2428f73

Contents?: true

Size: 804 Bytes

Versions: 43

Compression:

Stored size: 804 Bytes

Contents

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

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

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

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

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

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
dxw_govuk_frontend_rails-3.8.0 vendor/assets/stylesheets/tools/_font-url.scss
govuk_publishing_components-23.3.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.2.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.2.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.1.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.0.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.69.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.68.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.68.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.67.2 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.67.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.67.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.66.4 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.66.3 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.66.2 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.66.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.66.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.65.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.65.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-21.64.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss