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

Commit daf3b6b

Browse files
committed
Allow core-item to be sized via CSS font-size
1 parent 4cef344 commit daf3b6b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

core-item.css

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ html /deep/ core-item {
1414
white-space: nowrap;
1515
}
1616

17+
html /deep/ core-item.font-scalable {
18+
min-height: 2.5em;
19+
}
20+
1721
html /deep/ core-item.core-selected {
1822
font-weight: bold;
1923
}
@@ -22,6 +26,12 @@ html /deep/ core-item::shadow core-icon {
2226
margin: 0 16px 0 4px;
2327
}
2428

29+
html /deep/ core-item.font-scalable::shadow core-icon {
30+
margin: 0 1em 0 0.25em;
31+
height: 1.5em;
32+
width: 1.5em;
33+
}
34+
2535
html /deep/ core-item::shadow ::content > a {
2636
position: absolute;
2737
top: 0;

demo.html

+14
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
core-item {
2121
width: 300px;
2222
}
23+
24+
core-item.big {
25+
font-size: 24px;
26+
}
27+
28+
core-item.small {
29+
font-size: 12px;
30+
}
2331

2432
core-item.contact-item {
2533
height: 50px;
@@ -54,6 +62,12 @@ <h2>links (via &lt;a&gt;):</h2>
5462

5563
<core-item icon="settings" label="Settings"><a href="#settings" target="_self"></a></core-item>
5664
<core-item icon="account-box" label="Account"><a href="#account" target="_self"></a></core-item>
65+
66+
<h2>items sized with CSS:</h2>
67+
<core-item icon="settings" label="Settings" class="font-scalable big"></core-item>
68+
<core-item icon="account-box" label="Account" class="font-scalable big"></core-item>
69+
<core-item icon="settings" label="Settings" class="font-scalable small"></core-item>
70+
<core-item icon="account-box" label="Account" class="font-scalable small"></core-item>
5771

5872
<h2>custom item:</h2>
5973

0 commit comments

Comments
 (0)