Correct styling for focusable buttons

Fixes #5767
This commit is contained in:
Blade Barringer 2015-08-11 18:34:46 -05:00
parent 8360aa93fb
commit a29dd4cc16
2 changed files with 7 additions and 10 deletions

View file

@ -44,7 +44,7 @@ for $stage in $stages
background-color: darken($stage[1], 30%)
&:hover, &:focus
background-color: darken($stage[1], 40%)
input[type=checkbox]:focus + label, input.habit:focus + a
input[type=checkbox].task-input:focus + label, input.habit:focus + a
background-color: darken($stage[1], 40%)
.task-actions a:nth-of-type(2)
border-top: 1px solid darken($stage[1],50%) // If there are two habit buttons (+ -), add a border to separate them

View file

@ -4,15 +4,13 @@
// Habits
.task-actions(ng-if='::task.type=="habit"')
// score() is overridden in challengesCtrl to do nothing
input.visuallyhidden(
class="habit",
input.task-input.habit.visuallyhidden(
ng-if='task.up',
type='checkbox',
ui-keypress='{ 13:"score(task, \'up\')" }' )
a(ng-if='task.up', ng-click='applyingAction || score(task,"up")')
span.glyphicon.glyphicon-plus
input.visuallyhidden(
class="habit",
input.task-input.habit.visuallyhidden(
ng-if='task.down',
type='checkbox',
ui-keypress='{ 13:"score(task, \'down\')" }' )
@ -21,8 +19,7 @@
// Rewards
span(ng-if='::task.type=="reward"')
input.visuallyhidden(
class="reward",
input.task-input.reward.visuallyhidden(
type='checkbox',
ui-keypress='{ 13:"score(task, \'down\')" }' )
a.money.btn-buy(ng-class='{highValue: task.value >= 1000}', ng-click='score(task, "down")')
@ -31,11 +28,11 @@
// Daily & Todos
span.task-checker.action-yesno(ng-if='::task.type=="daily" || task.type=="todo"')
input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task.id}}', type='checkbox',
ng-model='task.completed', ng-if='$state.includes("tasks")',
input.task-input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task.id}}', type='checkbox',
ng-model='task.completed', ng-if='$state.includes("tasks")',
ng-change='task.type=="todo" && pushTask(task,$index,"bottom"); changeCheck(task)'
ui-keypress='{13:"task.completed = !task.completed; changeCheck(task)"}' )
input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task.id}}', type='checkbox',
input.visuallyhidden.focusable(id='box-{{::obj._id}}_{{::task.id}}', type='checkbox',
ng-if='!$state.includes("tasks")')
label(for='box-{{::obj._id}}_{{::task.id}}')