Sha256: 535901a5db5beef7c3a6c3ee43a8228682826668d81d5def077311c611341e1d

Contents?: true

Size: 1.09 KB

Versions: 67

Compression:

Stored size: 1.09 KB

Contents

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

/// List of modules which have already been exported
///
/// @type List
/// @access private

$_govuk-imported-modules: () !default;

/// Export module
///
/// Ensure that the modules of CSS that we define throughout Frontend are only
/// included in the generated CSS once, no matter how many times they are
/// imported across the individual components.
///
/// @param {String} $name - Name of module - must be unique within the codebase
/// @content The passed content will only be outputted if a module of the same
///   $name has not already been outputted
/// @access public

@mixin govuk-exports($name) {
  // If the mixin is not in the list of modules already exported...
  @if not index($_govuk-imported-modules, $name) {
    // ... then add it to the list
    $_govuk-imported-modules: append($_govuk-imported-modules, $name) !global;
    // ... and output the CSS for that module
    @content;
  }
  // The next time exports is called for the module of the same name, it will be
  // found in the list and so nothing will be outputted.
}

/*# sourceMappingURL=_exports.scss.map */

Version data entries

67 entries across 65 versions & 4 rubygems

Version Path
govuk_publishing_components-45.7.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.6.1 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.6.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.5.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.4.1 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.4.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.3.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_tech_docs-4.1.1 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.2.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.1.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-45.0.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
katalyst-govuk-formbuilder-1.13.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.11.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.10.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.9.1 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.9.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.8.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.7.1 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_publishing_components-44.7.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss
govuk_tech_docs-4.1.0 node_modules/govuk-frontend/dist/govuk/tools/_exports.scss