max-mapper / max-mapper/element-class

Removing Multiple Classes

Open
#11 2 comments 0 reactions 0 assignees View on GitHub

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

home

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.