Skip to content

Refine CSS classes remove method to only warn if passed a non-existent path (previously would throw an exception).#2450

Merged
ntoll merged 4 commits intomainfrom
css-class-removal-refinement
Feb 5, 2026
Merged

Refine CSS classes remove method to only warn if passed a non-existent path (previously would throw an exception).#2450
ntoll merged 4 commits intomainfrom
css-class-removal-refinement

Conversation

@ntoll
Copy link
Copy Markdown
Member

@ntoll ntoll commented Feb 5, 2026

Description

The remove method for CSS classes is now more forgiving - allowing you to attempt to remove non-existent classes without throwing an exception. It now logs a warning.

Changes

Updated the remove method. Added a check for this change of behaviour to an existing unit test.

Checklist

  • I have checked make build works locally.
  • I have created / updated documentation for this change (if applicable).

…t path (previously would throw an exception).
Copy link
Copy Markdown
Contributor

@WebReflection WebReflection left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always "panic" a bit when I see import js as I need to be sure it's not doing main thread things only ... I would've written that as:

from js import console

but at the same time, this is more a nit you can ignore than a blocker: approved!

@ntoll ntoll force-pushed the css-class-removal-refinement branch from 2edc66a to 0f118d3 Compare February 5, 2026 12:22
@ntoll
Copy link
Copy Markdown
Member Author

ntoll commented Feb 5, 2026

I've fixed the nit. Thanks for the spot.

@ntoll ntoll merged commit d6f401a into main Feb 5, 2026
2 checks passed
@ntoll ntoll deleted the css-class-removal-refinement branch February 5, 2026 12:31
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