- - - 9.1.2 - - #addons.how_works.structure - - - Structure - -
- - -To create an addon containing utilities:
-// import mlut tools
-@use "@mlut/core/tools" as ml;
-
-// create a map with the same scheme as map $utils,
-// when creating utilities in the config
-$utils: (
- 'BpAll _W': (5u, 10u, 20u, 25u, 40u, 70u),
- 'BpAll _H': (5u, 10u, 20u, 25u),
-);
-
-// put a map with new utils to the $utils-map from tools
-// as a key, use the unique name of the addon
-ml.$utils-map: map.set(
- ml.$utils-map,
- 'my-addon',
- $utils
-);
-
-// you can add the ability to cancel the generation of all utilities
-// to do this, create a setting
-$generate: true !default;
-
-// and hide behind it the writing new utilities to the common map
-@if $generate {
- ml.$utils-map: map.set(
-...
-
-
- content/main.css
, line 1598
-