Skip to content
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

Default theme's VPFlyout does not show without JavaScript #4224

Closed
4 tasks done
BeiyanYunyi opened this issue Sep 23, 2024 · 0 comments · Fixed by #4225
Closed
4 tasks done

Default theme's VPFlyout does not show without JavaScript #4224

BeiyanYunyi opened this issue Sep 23, 2024 · 0 comments · Fixed by #4225
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@BeiyanYunyi
Copy link
Contributor

BeiyanYunyi commented Sep 23, 2024

Describe the bug

Default theme's VPFlyout has these css:

.VPFlyout:hover .menu,
.button[aria-expanded="true"] + .menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.button[aria-expanded="false"] + .menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(0);
}

According to MDN Web Docs, the selector and + have the same specificity, which means the rule that comes next will override the rule that comes first. The result is, when JavaScript is disabled, the aria-expanded property will keep as false, and the contents of VPFlyout will never show.

Reproduction

Just go to the official docs site, disable JavaScript. Move mouse cursor over any VPFlyout components.

Expected behavior

The contents of VPFlyout should show with no JavaScript.

System Info

System:
    OS: Linux 6.10 Arch Linux
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
    Memory: 22.07 GB / 31.13 GB
    Container: Yes
    Shell: 3.7.1 - /usr/bin/fish
  Binaries:
    Node: 20.17.0 - ~/.nix-profile/bin/node
    npm: 10.8.2 - ~/.nix-profile/bin/npm
    pnpm: 9.9.0 - ~/.nix-profile/bin/pnpm
    bun: 1.1.29 - /usr/bin/bun

Additional context

No response

Validations

@BeiyanYunyi BeiyanYunyi added the bug: pending triage Maybe a bug, waiting for confirmation label Sep 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant