Pseudo class: invalid after setting, ask the reason

is ready to add hierarchical splitters to the tree component, which needs to be styled with pseudo classes, but it has no effect. The
code is as follows:

-sharptree-wrap {
  .el-tree-node.is-expanded {
    position: relative;
    >.el-tree-node__children::after{
      content: "";
      position: absolute;
      top: 25px;
      bottom: 0;
      left: 40px;
      height: calc(100% - 50px);
      border-left: 1px dashed -sharp666;
    }
  }
}

but the corresponding:: after,
clipboard.png

is not seen in DOM.

ask the reason.


what do you think you can see from the screenshot? the screenshot is so narrow that you are afraid of squeezing.
your after is added on children, and the location you are looking for is the parent element of children.
after pseudo elements are all in children, okay?


under styles look for the:: after style written


is it SASS? I wrote a simple test demo, to put your code into the test. There is :: after . Please check the code again.


[solve the case] found out the reason, using the scss tag < style lang= "scss" scoped > scoped interference, remove the scoped, pseudo-class appears normally. By deleting the scoped attribute, you can divide the style into id by component: (the following is an example)

-sharpxxx {
  .yyy {...}
  EE.zzz {...}
  ...
}
Menu