.bw-table { 
  border-collapse: separate;
  border-spacing: 0;
}
.bw-table td { 
  position: relative;
  border: 1px solid #CCC;
  empty-cells: show;
  height: 22px;
  padding: 0 4px 0 4px; /* top, bottom padding different than 0 is handled poorly by FF with HTML5 doctype */
  background-color: #FFF;
  font-size: 12px;
  vertical-align: top;
  overflow: hidden;
  outline-width: 0;
  white-space: pre-line; }

.bw-table-cell-input { 
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  opacity: 0;
  box-sizing: border-box;
  resize: none;
  font-size: inherit;
  line-height: inherit;
}

.readonly .bw-table-cell-input { 
  display: none;
}

.editing > .bw-table-cell-input { 
  opacity: 1;
}

.editing .bw-table-cell-contents {
  opacity: 0;
}