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

Unified Diff: sky/framework/sky-input.sky

Issue 951823002: Update Sky widgets to have more material design (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/framework/sky-icon.sky ('k') | sky/framework/sky-radio.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-input.sky
diff --git a/sky/framework/sky-input.sky b/sky/framework/sky-input.sky
index 2dcd646b0b7c93123deba337dd5feaecbd134dfc..ae49b907005c1ab9d43ca1d80d5d50ce13d404b6 100644
--- a/sky/framework/sky-input.sky
+++ b/sky/framework/sky-input.sky
@@ -10,17 +10,21 @@
<style>
:host {
display: flex;
- border: 1px solid blue;
- margin: 5px;
- padding: 4px;
}
#control {
+ margin: 8px;
+ padding: 8px;
+ border-bottom: 1px solid #E7E7E7;
flex: 1;
align-self: center;
height: 1.2em;
white-space: nowrap;
overflow: hidden;
}
+ #control.focused {
+ padding-bottom: 7px;
+ border-bottom: 2px solid #009cf3;
+ }
</style>
<div id="control" contenteditable />
</template>
@@ -57,10 +61,14 @@ class SkyInput extends SkyElement {
}
void _handleFocus(_) {
+ if (_control)
+ _control.setAttribute('class', 'focused');
// TODO(abarth): Show the keyboard.
}
void _handleBlur(_) {
+ if (_control)
+ _control.removeAttribute('class');
// TODO(abarth): Hide the keyboard.
}
}
« no previous file with comments | « sky/framework/sky-icon.sky ('k') | sky/framework/sky-radio.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698