openwebf/webf

attribute selector seems not working when there're same attributes in ancestor node

Opened this issue · 0 comments

Affected version

0.12.0 +

No same issues found.

  • Yes, I search all issues but not found.

Steps to Reproduce

see example below

Code example

<html style="font-size: 9.25926vw">
  <head>
    <meta charset="utf-8" />
    <meta content="portrait" name="screen-orientation" />
    <meta content="portrait" name="x5-orientation" />
    <meta content="webkit" name="renderer" />
    <meta content="max-age=180" http-equiv="Cache-control" />
    <meta
      name="viewport"
      content="width=device-width,initial-scale=0.5,maximum-scale=0.5,minimum-scale=0.5,user-scalable=no"
    />
    <title>attr selector</title>
    <meta name="keywords" content="请配置页面关键词" />
    <meta name="description" content="请配置页面描述" />
  </head>
  <style>
    body {
      width: 100%;
      height: 100vh;
      margin: 0;
    }
    .content[data-v-69423fe3] .at {
      color: green;
    }

    .content {
      font-size: 45px;
      font-weight: 400;
      line-height: 63px;
    }
  </style>

  <body>
    <div data-v-69423fe3 class="content">
      <span data-v-69423fe3>
        <span class="at">@隔壁村一狗</span>
      </span>
    </div>

    <div data-v-69423fe3 class="content">
      <span data-v-69423fe3-different>
        <div class="at">@隔壁村三狗</div>
      </span>
    </div>
    <script></script>
  </body>
</html>

Expected results

文本内容展示绿色

Actual results

文本内容展示黑色(绿色未生效)