dictionary.is-global()
The dictionary.is-global()
function checks whether the global dictionary is in use. Function checks the $dictionary-global
variable.
// Sass.
@use 'sass:meta';
// Variables.
@use 'dictionary.variables' as variables;
// The `translator.dictionary-is-global()` or `dictionary.is-global()` function.
@function is-global($global: null) {
@if if(meta.type-of($global) == bool, $global, variables.$dictionary-global) {
@return true;
}
@return $global;
}
https://github.com/angular-package/sass/blob/main/translator/dictionary/_dictionary.is-global.function.scss
Parameters
$global: null
$global: null
An optional bool
value indicates whether to use or not the global dictionary. Default, null
.
Return
The return value is a bool
indicating whether to use a global dictionary.
Examples
// Use.
@use '@angular-package/sass/translator';
// Examples.
// `variables.$dictionary-global`
@debug translator.dictionary-is-global(); // true
// `$global`
@debug translator.dictionary-is-global(true); // true
@debug translator.dictionary-is-global(false); // false
Last updated
Was this helpful?