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

Commit

Permalink
use a single stylesheet for all paper-items
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Jul 22, 2014
1 parent e97101b commit 716b57b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
10 changes: 3 additions & 7 deletions paper-item.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:host {
html /deep/ paper-item {
display: block;
position: relative;
-webkit-user-select: none;
Expand All @@ -8,18 +8,14 @@
padding: 0 12px;
}

#ripple {
html /deep/ paper-item::shadow #ripple {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}

#icon {
html /deep/ paper-item::shadow #icon {
margin-right: 8px;
}

#icon[hidden] {
display: none;
}
38 changes: 19 additions & 19 deletions paper-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<link href="../core-icon/core-icon.html" rel="import">
<link href="../paper-ripple/paper-ripple.html" rel="import">

<polymer-element name="paper-item" attributes="label iconSrc icon" center horizontal layout>
<link href="paper-item.css" rel="stylesheet" shim-shadowdom>

<template>
<polymer-element name="paper-item" attributes="label iconSrc icon" center horizontal layout on-click="{{clickAction}}">

<link href="paper-item.css" rel="stylesheet">
<template>

<paper-ripple id="ripple"></paper-ripple>

Expand All @@ -55,29 +55,29 @@
*/
label: '',

/**
/**
* (optional) The URL of an image for an icon to use in the button.
* Should not use `icon` property if you are using this property.
*
* @attribute iconSrc
* @type string
* @default ''
*/
iconSrc: {value: ''},

/**
* (optional) Specifies the icon name or index in the set of icons
* available in the icon set. If using this property, load the icon
* set separately where the icon is used. Should not use `src`
* if you are using this property.
*
* @attribute icon
* @type string
* @default ''
*/
icon: {value: ''}

}
iconSrc: {value: ''},

/**
* (optional) Specifies the icon name or index in the set of icons
* available in the icon set. If using this property, load the icon
* set separately where the icon is used. Should not use `src`
* if you are using this property.
*
* @attribute icon
* @type string
* @default ''
*/
icon: {value: ''}

}
});
</script>
</polymer-element>

0 comments on commit 716b57b

Please sign in to comment.