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

Commit

Permalink
Allow core-item to be sized via CSS font-size
Browse files Browse the repository at this point in the history
  • Loading branch information
cletusw committed Jul 31, 2014
1 parent 4cef344 commit daf3b6b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core-item.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ html /deep/ core-item {
white-space: nowrap;
}

html /deep/ core-item.font-scalable {
min-height: 2.5em;
}

html /deep/ core-item.core-selected {
font-weight: bold;
}
Expand All @@ -22,6 +26,12 @@ html /deep/ core-item::shadow core-icon {
margin: 0 16px 0 4px;
}

html /deep/ core-item.font-scalable::shadow core-icon {
margin: 0 1em 0 0.25em;
height: 1.5em;
width: 1.5em;
}

html /deep/ core-item::shadow ::content > a {
position: absolute;
top: 0;
Expand Down
14 changes: 14 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
core-item {
width: 300px;
}

core-item.big {
font-size: 24px;
}

core-item.small {
font-size: 12px;
}

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

<core-item icon="settings" label="Settings"><a href="#settings" target="_self"></a></core-item>
<core-item icon="account-box" label="Account"><a href="#account" target="_self"></a></core-item>

<h2>items sized with CSS:</h2>
<core-item icon="settings" label="Settings" class="font-scalable big"></core-item>
<core-item icon="account-box" label="Account" class="font-scalable big"></core-item>
<core-item icon="settings" label="Settings" class="font-scalable small"></core-item>
<core-item icon="account-box" label="Account" class="font-scalable small"></core-item>

<h2>custom item:</h2>

Expand Down

0 comments on commit daf3b6b

Please sign in to comment.