Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html

Issue 1862213002: Roll third_party/polymer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete appearance_browsertest.js, result of a previous bad merge. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html
diff --git a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html
index 00d314217dde576f147a3f5586a0b14f542f265b..2f320fe5f009ce757458b5e6a6e734a5194d08d1 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html
+++ b/third_party/polymer/v1_0/components-chromium/paper-icon-button/paper-icon-button.html
@@ -8,11 +8,8 @@ Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><html><head><link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
-<link rel="import" href="../paper-ripple/paper-ripple.html">
+<link rel="import" href="../paper-styles/default-theme.html">
<!--
Material design: [Icon toggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)
@@ -25,7 +22,7 @@ from the icon set to use.
<paper-icon-button icon="menu"></paper-icon-button>
-See [`iron-iconset`](#iron-iconset) for more information about
+See [`iron-iconset`](iron-iconset) for more information about
how to use a custom icon set.
Example:
@@ -35,6 +32,14 @@ Example:
<paper-icon-button icon="favorite"></paper-icon-button>
<paper-icon-button src="star.png"></paper-icon-button>
+To use `paper-icon-button` as a link, wrap it in an anchor tag. Since `paper-icon-button`
+will already receive focus, you may want to prevent the anchor tag from receiving focus
+as well by setting its tabindex to -1.
+
+ <a href="https://www.polymer-project.org" tabindex="-1">
+ <paper-icon-button icon="polymer"></paper-icon-button>
+ </a>
+
### Styling
Style the button with CSS as you would a normal DOM element. If you are using the icons
@@ -77,12 +82,13 @@ Custom property | Description | Default
cursor: pointer;
z-index: 0;
line-height: 1;
-
+
width: 40px;
height: 40px;
/* Because of polymer/2558, this style has lower specificity than * */
box-sizing: border-box !important;
+
@apply(--paper-icon-button);
}
@@ -95,10 +101,11 @@ Custom property | Description | Default
color: var(--paper-icon-button-disabled-text, --disabled-text-color);
pointer-events: none;
cursor: auto;
+
@apply(--paper-icon-button-disabled);
}
-
- :host(:hover) {
+
+ :host(:hover) {
@apply(--paper-icon-button-hover);
}
@@ -107,6 +114,7 @@ Custom property | Description | Default
--iron-icon-height: 100%;
}
</style>
+
<iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
</template>

Powered by Google App Engine
This is Rietveld 408576698