Sha256: 57d8c072647f83c1eef2167388068168e702ddd360fee9db137ca650ae37c36c

Contents?: true

Size: 721 Bytes

Versions: 173

Compression:

Stored size: 721 Bytes

Contents

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

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

173 entries across 170 versions & 4 rubygems

Version Path
govuk_publishing_components-24.1.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-24.0.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.15.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.14.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.13.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.13.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.12.3 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.12.2 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.12.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.12.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.11.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.11.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
dxw_govuk_frontend_rails-3.10.2 vendor/assets/stylesheets/tools/_font-url.scss
dxw_govuk_frontend_rails-3.9.1 vendor/assets/stylesheets/tools/_font-url.scss
govuk_publishing_components-23.10.2 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.10.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.10.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.9.2 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.9.1 node_modules/govuk-frontend/govuk/tools/_font-url.scss
govuk_publishing_components-23.9.0 node_modules/govuk-frontend/govuk/tools/_font-url.scss