max-mapper / max-mapper/element-class
Removing Multiple Classes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 42
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've been playing around with the library today and everything seems great so far. However I've hit a slight weirdness that I wonder if you can help with!
I noticed in the source that you should be able to add/remove multiple classes if they're separated via a space.
e.g the example I'm using resembles something like
classes('body').add('overflow-hidden height-100vh')
which works absolutely fine and I end up with

However when I try remove them with
classes('body').remove('overflow-hidden height-100vh')
It doesn't do anything at all.
If i do
classes('body').remove('height-100vh')
classes('body').remove('overflow-hidden')
It works as expected.
Do you have any ideas what could be the issue here?
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the classes('body').remove(...) entry point and reproduce the issue with the two space-separated class names shown in the report. Compare that behavior with separate remove calls and consider the work complete when one call removes both classes without affecting the existing single-class behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100