Replaces #37114 because I couldn't push to that PR.
Re-opening of #35977 after accidentally closing it on my repo (sorry again for that). @mdo, I hope I didn't lose any of your edits in the process as I've also rebased
main
to fix conflicts in the docs.As a reminder of what it was about:
Code for #35945. Just threw some code in to get the shapes of the functions. Still need testing, handling all the cases (values not being maps for example), and docs updates (but I'll do that last once the code is set). The PR adds the following:
- functions to get options, a specific option or a specific value for a given utility: a.
utilities-get-options
b.utilities-get-option
c.utilities-get-value
- mixins to set options (in bulk or a specific one), new values or remove values for a given utility: a.
utilities-set-options
(defaults to merging with existing, but can be used to completely override by passing$merge: false
, allowing to completely redefine a utility if necessary) b.utilities-set-option
(just a thin wrapper onutilities-set-options
) c.utilities-add-values
d.utilities-remove-values
- mixins to add or remove utilities (they don't do as much as the rest, but provide consistency) a.
utilities-add
b.utilities-remove
Please let me know if there'd be one I missed, or if some are too much (2.b, 3.a. and 3.b for example only bring a consistent API by thinly wrapping other existing functions/mixins)