Skip to content

[refactor] Use CSS classes for menu visibility instead of inline styles #10

@NextDev65

Description

@NextDev65

Refactor the settings menu to use a CSS class (e.g., .visible) to control its visibility and animations, rather than directly manipulating menu.style.display. This will improve maintainability and allow for cleaner, CSS-based transitions.

When animations are enabled, the class should trigger a fade-in/out effect. When animations are disabled, it should fall back to toggling the hidden attribute for maximum efficiency.

  • CSS:
    • Create a .visible class that sets display: block and opacity: 1.
    • The base .settings-dropdown class should have display: none and opacity: 0, with a transition on the opacity property.
  • JavaScript:
    • The settings cog click handler should toggle the .visible class on the menu element.
    • The logic should check the settings.animations flag to decide whether to toggle the class or the hidden attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions