Skip to content

[1.0] dom-if adds <span> tag (with lots of whitespace) above and below element #1725

@ghost

Description

the dom-if template adds a <span> tag above and below the element which contains a lot of extra whitespace. When placed inside a css display: table layout, it completely kills the layout.

<dom-module id="test">
  <template>
    <div class="test">

      <!-- portrait -->
      <template is="dom-if" if="true">
        <div>Hello</div>
      </template>

    </div>
  </template>
</dom-module>

results in

<test>
    <div class="hi style-scope test">

      <!-- portrait -->
      <span>
        </span><div class="style-scope test">Hello</div><span>
      </span>
     <template is="dom-if" if="true" class="style-scope test"></template>

    </div>
</test>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions