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

Unified Diff: third_party/polymer/v1_0/components/paper-fab/paper-fab.html

Issue 1187823002: Update Polymer components and re-run reproduce.sh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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/paper-fab/paper-fab.html
diff --git a/third_party/polymer/v1_0/components/paper-fab/paper-fab.html b/third_party/polymer/v1_0/components/paper-fab/paper-fab.html
index 16e5de18818ce80c6f27d0809631670e19e3bf8a..f607ca471137e9372b87b0229d215bd57fc34312 100644
--- a/third_party/polymer/v1_0/components/paper-fab/paper-fab.html
+++ b/third_party/polymer/v1_0/components/paper-fab/paper-fab.html
@@ -42,7 +42,8 @@ The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
-`--paper-fab-background` | The background color of the button | `--paper-indigo-500`
+`--paper-fab-background` | The background color of the button | `--accent-color`
+`--paper-fab-keyboard-focus-background` | The background color of the button when focused | `--paper-pink-900`
`--paper-fab-disabled-background` | The background color of the button when it's disabled | `--paper-grey-300`
`--paper-fab-disabled-text` | The text color of the button when it's disabled | `--paper-grey-500`
`--paper-fab` | Mixin applied to the button | `{}`
@@ -71,7 +72,7 @@ Custom property | Description | Default
min-width: 0;
width: 56px;
height: 56px;
- background: var(--paper-fab-background, --paper-indigo-500);
+ background: var(--paper-fab-background, --accent-color);
color: var(--text-primary-color);
border-radius: 50%;
padding: 16px;
@@ -97,11 +98,18 @@ Custom property | Description | Default
paper-material {
border-radius: inherit;
+ @apply(--layout-fit);
+ @apply(--layout-vertical);
+ @apply(--layout-center-center);
+ }
+
+ .keyboard-focus {
+ background: var(--paper-fab-keyboard-focus-background, --paper-pink-900);
}
</style>
<template>
<paper-ripple></paper-ripple>
- <paper-material class="content fit flex layout vertical center-center" elevation="[[elevation]]" animated>
+ <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated>
<iron-icon id="icon" src="[[src]]" icon="[[icon]]"></iron-icon>
</paper-material>
</template>
@@ -153,6 +161,14 @@ Custom property | Description | Default
type: Boolean,
value: false
}
+ },
+
+ _computeContentClass: function(receivedFocusFromKeyboard) {
+ var className = 'content';
+ if (receivedFocusFromKeyboard) {
+ className += ' keyboard-focus';
+ }
+ return className;
}
});

Powered by Google App Engine
This is Rietveld 408576698