Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit ab64197

Browse files
committed
Improve rendering speed of core-item without an icon.
1 parent 21883af commit ab64197

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core-item.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232

3333
<polymer-element name="core-item" attributes="label icon src" horizontal center layout>
3434
<template>
35-
3635
<link rel="stylesheet" href="core-item.css">
37-
38-
<core-icon src="{{src}}" id="icon" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon>
36+
<template if="{{icon || src}}">
37+
<core-icon src="{{src}}" id="icon" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon>
38+
</template>
3939
<div id="label">{{label}}</div>
4040
<content></content>
41-
4241
</template>
4342
<script>
4443

0 commit comments

Comments
 (0)