Button widget annotations: improve unit tests, simplify code and remove labels
Modern browsers support styling radio buttons and checkboxes with CSS. This makes the implementation much easier, and the fallback for older browsers is still decent.
This commit is contained in:
parent
77148c7880
commit
a428899b3c
5 changed files with 88 additions and 184 deletions
|
@ -15,6 +15,11 @@
|
|||
|
||||
/* Used for annotation layer tests */
|
||||
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.annotationLayer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -46,8 +51,8 @@
|
|||
.annotationLayer .textWidgetAnnotation input,
|
||||
.annotationLayer .textWidgetAnnotation textarea,
|
||||
.annotationLayer .choiceWidgetAnnotation select,
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox label,
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton label {
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox input,
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton input {
|
||||
background-color: rgba(0, 54, 255, 0.13);
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
|
@ -67,8 +72,8 @@
|
|||
.annotationLayer .textWidgetAnnotation input[disabled],
|
||||
.annotationLayer .textWidgetAnnotation textarea[disabled],
|
||||
.annotationLayer .choiceWidgetAnnotation select[disabled],
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled] + label,
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] + label {
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
|
||||
background: none;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
@ -79,19 +84,12 @@
|
|||
padding-right: 0;
|
||||
}
|
||||
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox label,
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton label {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.annotationLayer .buttonWidgetAnnotation.checkBox input,
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton input {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
.annotationLayer .buttonWidgetAnnotation.radioButton label {
|
||||
border-radius: 50%;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
-ms-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.annotationLayer .popupAnnotation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue