From ed033fe0929ccd6acd4fba51ea1d84486e4334fd Mon Sep 17 00:00:00 2001 From: Roberto von Schoettler Date: Mon, 10 Sep 2018 09:54:06 -0400 Subject: [PATCH 1/4] Adding tabbable events --- src/EventCell.js | 4 ++-- src/less/event.less | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/EventCell.js b/src/EventCell.js index c44a8f98c..200d08d68 100644 --- a/src/EventCell.js +++ b/src/EventCell.js @@ -70,7 +70,7 @@ class EventCell extends React.Component { return ( -
onDoubleClick && onDoubleClick(event, e)} > {typeof children === 'function' ? children(content) : content} -
+
) } diff --git a/src/less/event.less b/src/less/event.less index c46bf3764..231cdfa1d 100644 --- a/src/less/event.less +++ b/src/less/event.less @@ -3,9 +3,12 @@ .rbc-event { padding: @event-padding; background-color: @event-bg; + border: 0; border-radius: @event-border-radius; color: @event-color; cursor: pointer; + width: 100%; + text-align: left; .rbc-slot-selecting & { cursor: inherit; @@ -15,6 +18,10 @@ &.rbc-selected { background-color: darken(@event-bg, 10%); } + + &:focus { + border: 2px solid red; + } } .rbc-event-label { @@ -44,4 +51,3 @@ border-bottom-left-radius: 0; border-bottom-right-radius: 0; } - From 153e91433042eae034a4729e7e5a3a764cab9a47 Mon Sep 17 00:00:00 2001 From: Roberto von Schoettler Date: Mon, 10 Sep 2018 11:29:53 -0400 Subject: [PATCH 2/4] Adding button reset & Chrome's default outline for all browsers --- src/less/event.less | 3 +-- src/less/reset.less | 8 ++++++++ src/less/variables.less | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/less/event.less b/src/less/event.less index 231cdfa1d..1f9691ed9 100644 --- a/src/less/event.less +++ b/src/less/event.less @@ -3,7 +3,6 @@ .rbc-event { padding: @event-padding; background-color: @event-bg; - border: 0; border-radius: @event-border-radius; color: @event-color; cursor: pointer; @@ -20,7 +19,7 @@ } &:focus { - border: 2px solid red; + outline: 5px auto @event-outline; } } diff --git a/src/less/reset.less b/src/less/reset.less index 7c3a8c9bf..c97b037c7 100644 --- a/src/less/reset.less +++ b/src/less/reset.less @@ -4,6 +4,14 @@ margin: 0; } +button { + padding: 0; + margin: 0; + border: none; + box-shadow: none; + background: none; +} + button.rbc-btn { overflow: visible; text-transform: none; diff --git a/src/less/variables.less b/src/less/variables.less index 63d1a274e..87a54c074 100644 --- a/src/less/variables.less +++ b/src/less/variables.less @@ -16,6 +16,7 @@ @event-bg: #3174ad; @event-border: darken(#3174ad, 10%); +@event-outline: #3b99fc; @event-color: #fff; @event-border-radius: 5px; @event-padding: 2px 5px; From d33e64d7eec4b2cb15ecf8d30865cc1fe34261bb Mon Sep 17 00:00:00 2001 From: Roberto von Schoettler Date: Mon, 10 Sep 2018 14:36:21 -0400 Subject: [PATCH 3/4] Scoping button reset to .rbc-event --- src/less/event.less | 2 +- src/less/reset.less | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/less/event.less b/src/less/event.less index 1f9691ed9..4b5d3bf87 100644 --- a/src/less/event.less +++ b/src/less/event.less @@ -1,6 +1,6 @@ @import './variables.less'; -.rbc-event { +button.rbc-event { padding: @event-padding; background-color: @event-bg; border-radius: @event-border-radius; diff --git a/src/less/reset.less b/src/less/reset.less index c97b037c7..3110099b0 100644 --- a/src/less/reset.less +++ b/src/less/reset.less @@ -4,14 +4,6 @@ margin: 0; } -button { - padding: 0; - margin: 0; - border: none; - box-shadow: none; - background: none; -} - button.rbc-btn { overflow: visible; text-transform: none; @@ -27,3 +19,11 @@ button.rbc-input::-moz-focus-inner { border: 0; padding: 0; } + +button.rbc-event { + padding: 0; + margin: 0; + border: none; + box-shadow: none; + background: none; +} From 2cecec4e93e8fc8eaf4688ae19d735615635cccb Mon Sep 17 00:00:00 2001 From: Roberto von Schoettler Date: Wed, 12 Sep 2018 14:10:59 -0400 Subject: [PATCH 4/4] Moving reset to event.less --- src/less/event.less | 5 ++++- src/less/reset.less | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/less/event.less b/src/less/event.less index 4b5d3bf87..31766eba4 100644 --- a/src/less/event.less +++ b/src/less/event.less @@ -1,6 +1,9 @@ @import './variables.less'; -button.rbc-event { +.rbc-event { + border: none; + box-shadow: none; + margin: 0; padding: @event-padding; background-color: @event-bg; border-radius: @event-border-radius; diff --git a/src/less/reset.less b/src/less/reset.less index 3110099b0..7c3a8c9bf 100644 --- a/src/less/reset.less +++ b/src/less/reset.less @@ -19,11 +19,3 @@ button.rbc-input::-moz-focus-inner { border: 0; padding: 0; } - -button.rbc-event { - padding: 0; - margin: 0; - border: none; - box-shadow: none; - background: none; -}