Skip to content

Add of the removeSelector from Block (previously in the todo list) #77

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

Merged
merged 1 commit into from
Jun 30, 2014

Conversation

odinduclos
Copy link
Contributor

No description provided.

@sabberworm
Copy link
Collaborator

Thanks for the pull request. I think I will merge this. However, I’ll add a unit test first.

Also, there are some issues with this new method:

  1. What I meant with the item on my to-do-list was more of a removeDeclarationBlocksWithSelector method so this does not quite address what I saw lacking.
  2. What if the selector that was removed was the last one? Shouldn’t that result in the removal of the whole declaration block?
  3. I think removeSelector should return true or false depending on whether or not the selector had been found.
  4. Currently, the CSS Parser does not parse selectors (another item on the to-do-list) so it has no way of knowing that .header>table and .header > table (note the spaces) are just two ways of writing the same. In my opinion, the removeSelector function should work with both forms of input.

Still even with those issues, I can see no reason for not having this method in.

@sabberworm
Copy link
Collaborator

Oh, I see, I did add a removeDeclarationBlockBySelector method at some point so I’ll remove the to-do item.

@odinduclos
Copy link
Contributor Author

I Will do a longer talk tomorrow. But yeah i used your function in my code
with a simple count getSelectors. Thx for thé answer!
Le 30 juin 2014 20:33, "Raphael Schweikert" notifications@github.com a
écrit :

Oh, I see, I did add a removeDeclarationBlockBySelector method at some
point so I’ll remove the to-do item.


Reply to this email directly or view it on GitHub
#77 (comment)
.

@sabberworm sabberworm merged commit 48e4380 into MyIntervals:master Jun 30, 2014
@sabberworm
Copy link
Collaborator

I had to change some stuff but I hope it’s still what you wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants