Sha256: 1fd1a8da9e068a3a6e39c273de71d7580d7f982d5d41a07c768ad781ef8d033a

Contents?: true

Size: 784 Bytes

Versions: 68

Compression:

Stored size: 784 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) {
  // prettier-ignore
  $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);
  }
}

/*# sourceMappingURL=_font-url.scss.map */

Version data entries

68 entries across 66 versions & 4 rubygems

Version Path
govuk_tech_docs-4.1.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.6.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_tech_docs-4.0.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.5.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.4.2 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.4.1 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.4.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.3.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.2.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.1.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
katalyst-govuk-formbuilder-1.12.1 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-44.0.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
katalyst-govuk-formbuilder-1.12.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.5.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.4.1 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.4.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.3.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.2.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
katalyst-govuk-formbuilder-1.11.0 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss
govuk_publishing_components-43.1.1 node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss