Selector
This module is used to alter selectors for components
Variables
$config
Variable Type: Map
Module Settings
$config: (
"prefix" : ""
);
File Information
- File: _selector.scss
- Group: selector
- Type: variable
- Lines (comments): 10-12
- Lines (code): 14-16
Map Properties
Name | Type | Default | Description |
---|---|---|---|
prefix | String | "" | Global prefix for selectors (would be used for classname prefix for example) |
Mixins
set()
Mixin
Change modules $config
File Information
- File: _selector.scss
- Group: selector
- Type: mixin
- Lines (comments): 24-27
- Lines (code): 28-30
Examples
General example
@include ulu.selector-set(( "property" : value ));
Parameters
Name | Type | Description |
---|---|---|
$changes | Map |
Map of changes |
Require
set-class-overrides()
Mixin
Set the class selector overrides
- When a component or user module that is using selector module requests a classname any changes passed here will override the default selector
File Information
- File: _selector.scss
- Group: selector
- Type: mixin
- Lines (comments): 41-48
- Lines (code): 50-60
Examples
Changing the color-context classname to background and all typography base/utility classes to 'text' using wildcard
@include ulu.selector-set-class-overrides((
"color-context" : "background",
"type*" : "text"
));
Parameters
Name | Type | Description |
---|---|---|
$changes | Map |
Changes to merge map of classnames to classname change |
Functions
get()
Function
Get a config option
File Information
- File: _selector.scss
- Group: selector
- Type: function
- Lines (comments): 32-35
- Lines (code): 37-39
Examples
General example
@include ulu.selector-get("property");
Parameters
Name | Type | Description |
---|---|---|
$name | Map |
Name of property |
Require
- require-map-get()
- $config
class()
Function
Used to allow global prefixing of classes, and also the ability to Change a class used in the system (ie. like a component for example)
File Information
- File: _selector.scss
- Group: selector
- Type: function
- Lines (comments): 62-64
- Lines (code): 66-77
Parameters
Name | Type | Description |
---|---|---|
$class | String |
The base classname to get (which is then returned modified if the user has adjusted that specific classname |