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

BUG: :last-child CSS selector not working #347

Open
timonson opened this issue Jun 13, 2020 · 2 comments
Open

BUG: :last-child CSS selector not working #347

timonson opened this issue Jun 13, 2020 · 2 comments

Comments

@timonson
Copy link

timonson commented Jun 13, 2020

Issue description

When serving an index.html file with live-server the CSS selector :last-child doesn't select an element.

Software details

  • Command line used for launching live-server: live-server
  • OS: Linux, Arch
  • Node.js version: v14.4.0
  • live-server version: 1.2.1

Example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>'index.html'</title>
    <link rel="icon" href="data:," />
    <style>
      body div:last-child {
        background: blue;
      }
    </style>
  </head>
  <body>
    <div id="inlineWrapper">
      <a href="#" target="_blank">Anchor Text</a>
    </div>
    <div id="blockWrapper">
      <a href="#" target="_blank">Anchor Text</a>
    </div>
  </body>
</html>
@timonson
Copy link
Author

timonson commented Jun 13, 2020

For more information, look here please: ritwickdey/vscode-live-server#174

@yankunsong
Copy link

same problem here

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

No branches or pull requests

2 participants