shared style

This commit is contained in:
George Michael Brower 2014-09-03 12:52:28 -04:00
parent e4144fb3e2
commit c31ddef69f
18 changed files with 79 additions and 55 deletions

14
TODO
View File

@ -8,19 +8,15 @@ DOCS
STYLE STYLE
- [ ] sharing more styles
- [ ] css linter?
- [ ] touch styles: bigger please! - [ ] touch styles: bigger please!
- [ ] kill hover behavior if touch - [ ] kill hover behavior if touch
- [x] sharing more styles
CLEANLINESS CLEANLINESS
- [ ] can gui-row be baked into base-controller somehow? - [ ] can gui-row be baked into base-controller somehow?
- [ ] strip component-slider from number-controller
- [ ] strip component-input from number-controller, unify with string-controller
PARITY PARITY
- [ ] folders - [ ] folders
@ -35,3 +31,9 @@ PARITY
NEW FEATURES NEW FEATURES
- [ ] save server - [ ] save server
NICE TO HAVES
- [ ] css linter?
- [ ] strip component-slider from number-controller
- [ ] strip component-input from number-controller, unify with string-controller

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
@import '../elements/shared.styl'; @import '../elements/shared/shared';
unit = 18px unit = 18px
body-padding = unit * 2; body-padding = unit * 2;

View File

@ -7,6 +7,7 @@
<template> <template>
<link rel="stylesheet" href="../shared/controller.css">
<link rel="stylesheet" href="controller-boolean.css"> <link rel="stylesheet" href="controller-boolean.css">
<div id="container" horizontal layout center on-tap="{{ toggle }}" class="value-{{ value }}"> <div id="container" horizontal layout center on-tap="{{ toggle }}" class="value-{{ value }}">

View File

@ -10,6 +10,7 @@
<template> <template>
<link rel="stylesheet" href="../shared/controller.css">
<link rel="stylesheet" href="controller-function.css"> <link rel="stylesheet" href="controller-function.css">
<div id="container"></div> <div id="container"></div>

View File

@ -0,0 +1 @@
@import '../shared/shared';

View File

@ -11,6 +11,7 @@
<template> <template>
<link rel="stylesheet" href="../shared/controller.css">
<link rel="stylesheet" href="controller-number.css"> <link rel="stylesheet" href="controller-number.css">
<div id="container" class="transition slider-{{ slider }}" horizontal layout center> <div id="container" class="transition slider-{{ slider }}" horizontal layout center>

View File

@ -150,6 +150,14 @@ Polymer( 'controller-number', {
}, },
keydown: function( e ) {
if ( e.keyCode == 13 ) {
this.$.input.blur();
}
},
down: function( e ) { down: function( e ) {
e.preventDefault(); e.preventDefault();
@ -204,13 +212,6 @@ Polymer( 'controller-number', {
}, },
keydown: function( e ) {
if ( e.keyCode == 13 ) {
this.$.input.blur();
}
},
// Filters // Filters

View File

@ -1,4 +1,4 @@
@import '../shared'; @import '../shared/shared';
track-size = 1px; track-size = 1px;
fill-size = 1px; fill-size = 1px;
@ -69,7 +69,7 @@ knob-size = 6px
input { input {
input( number-color ); color: number-color;
.slider-true & { .slider-true & {

View File

@ -10,9 +10,12 @@
<template> <template>
<link rel="stylesheet" href="../shared/controller.css">
<link rel="stylesheet" href="controller-string.css"> <link rel="stylesheet" href="controller-string.css">
<input id="input" type="text" value="{{ value }}"> <input id="input" type="text" value="{{ value }}"
on-click="{{ click }}"
on-keydown="{{ keydown }}">
</template> </template>

View File

@ -6,5 +6,18 @@ Gui.register( 'controller-string', function( value ) {
Polymer( 'controller-string', { Polymer( 'controller-string', {
click: function( e ) {
this.$.input.select();
},
keydown: function( e ) {
if ( e.keyCode == 13 ) {
this.$.input.blur();
}
}
}); });

View File

@ -1,10 +1,7 @@
@import '../shared'; @import '../shared/shared';
:host
height: 100%;
input input
input( string-color ); color: string-color;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-left: padding padding-left: padding

View File

@ -1,8 +1,4 @@
@import '../shared'; @import '../shared/shared';
#controllers {
overflow: auto;
}
#container { #container {
@ -34,6 +30,14 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
#controllers {
position: absolute;
width: 100%;
bottom: 0;
top: 0;
overflow: auto;
}
&.open-true { &.open-true {
} }
@ -75,8 +79,8 @@
top: 0; top: 0;
color: black; color: black;
width: 50px; width: 60px;
height: 50px; height: 60px;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;

View File

@ -1,4 +1,4 @@
@import '../shared'; @import '../shared/shared';
:host { :host {

View File

@ -0,0 +1,13 @@
@import 'shared';
input
height: 100%;
display: inline-block;
background-color: transparent;
border: 0;
padding: 0;
outline: none;
transition: background-color 0.15s linear;
box-sizing: border-box;
&:hover, &:focus
background: lighter

View File

@ -37,16 +37,3 @@ panel-font( color = font-color )
color: color; color: color;
if ( color == font-color ) if ( color == font-color )
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
input( color )
panel-font( color )
height: 100%;
display: inline-block;
background-color: transparent;
border: 0;
padding: 0;
outline: none;
transition: background-color 0.15s linear;
box-sizing: border-box;
&:hover, &:focus
background: lighter

View File

@ -53,7 +53,7 @@ gulp.task( 'vulcanize', [ 'css' ], function() {
gulp.task( 'css', function() { gulp.task( 'css', function() {
return css( 'elements/*/*.styl', 'elements' ); return css( 'elements/**/*.styl', 'elements' );
} ); } );