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): 11-13
- Lines (code): 15-17
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): 25-28
- Lines (code): 29-31
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): 42-49
- Lines (code): 51-61
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): 33-36
- Lines (code): 38-40
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): 63-65
- Lines (code): 67-78
Parameters
| Name | Type | Description |
|---|---|---|
| $class | String |
The base classname to get (which is then returned modified if the user has adjusted that specific classname |
Require
- get()
- fallback()