Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2944

Support Shadow element selector

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major Major
    • 8.0.1
    • 8.0.0
    • None
    • None
    • ZK 8.0.1 S1, ZK 8.0.1 S2, ZK 8.0.1 S3
    • None

      For example,

      // zul file
      <div id="div">
          <apply id="sh1">
                <if test="true">
                      <label value="I am here"/>
                </if>
          </apply>
      </div>
      
      List<Component> applies = Selectors.find(page, "::shadow #sh1");
      
      // or
      List<Component> ifs = Selectors.find(page, ":host(#div)::shadow if");
      

      Note: we don't need to support this case. (component in shadow)
      For example,

      #div::shadow if > label
      
      // the user should use the following way instead
      #div > label
      

      The spec. referred from W3 spec.

      ::shadow pseudo element
      /deep/ combinator, which was replaced with a >>> combinator (or shadow piercing descendant combinator)
      ::content pseudo-element
      :host pseudo-class and :host() functional pseudo-class
      :host-context() functional pseudo-class
      

      Reference Link:

            christopherszu christopherszu
            jumperchen jumperchen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days
                4d