Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hu-append and hu-prepend should remove duplicates when adding to a list #32

Open
stowball opened this issue Aug 1, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@stowball
Copy link
Owner

stowball commented Aug 1, 2020

If you customise a $type variable like $hu-height-types, hu-append a list/map of per-project heights and then accidentally do it twice (for instance, by @importing the custom hu-height partial twice`, the custom classes will be generated twice.

When appending/prepending maps, this is not an issue since map-merge keeps the target if both the $source and $target contain identical keys.

While it's an edge-case (which I just ran into 😅), it could cause unnecessary confusion as to why multiple classes are output. Also, if a user accidentally overwrote 100%, for example, then their version of 100% would take precedence when hu-appending, but not when hu-prepending.

@stowball stowball added the enhancement New feature or request label Aug 1, 2020
@stowball stowball changed the title hu-append and hu-append should remove duplicates when adding to a list hu-append and hu-prepend should remove duplicates when adding to a list Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant