Replace inline styles in JavaScript with CSS classes #11

Closed
opened 2026-02-15 05:30:58 -08:00 by kyle · 0 comments
Owner

Problem: ConfigManager.applyBackgroundImage() set 14 inline style properties. DeparturesManager card enter/leave animations and highlight effect used inline transitions. Config modal form elements had extensive inline styles.

Solution: Created CSS classes for background-overlay orientations, card-entering/card-leaving/card-visible animations, highlight-flash keyframe animation, and config modal layout utilities. Updated JS to toggle classes instead of setting style properties.

Files changed:

  • public/css/components.css - Added overlay, animation, and utility classes
  • public/js/components/ConfigManager.js - Use CSS classes for overlay and form
  • public/js/components/DeparturesManager.js - Use CSS classes for animations
Problem: ConfigManager.applyBackgroundImage() set 14 inline style properties. DeparturesManager card enter/leave animations and highlight effect used inline transitions. Config modal form elements had extensive inline styles. Solution: Created CSS classes for background-overlay orientations, card-entering/card-leaving/card-visible animations, highlight-flash keyframe animation, and config modal layout utilities. Updated JS to toggle classes instead of setting style properties. Files changed: - public/css/components.css - Added overlay, animation, and utility classes - public/js/components/ConfigManager.js - Use CSS classes for overlay and form - public/js/components/DeparturesManager.js - Use CSS classes for animations
kyle closed this issue 2026-02-15 05:32:02 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kyle/SignageHTML#11