Commit b176fbfc authored by Aron Carroll's avatar Aron Carroll

Remove selection overrides

Having the browser text selection behaviour change when it moves over
a highlight is extremely confusing. This change removes that behaviour,
the highlight mixin and brings the PDFjs override file inline with
common.css
parent ab219224
......@@ -326,16 +326,4 @@ html {
.search-hl-active {
background: $highlight-color;
box-shadow:3px 3px 4px -1px #999999;
&::-moz-selection {
background: $highlight-color;
box-shadow:3px 3px 4px #999999;
}
&::-moz-selection, &::-moz-window-inactive, &::window-inactive {
background: $highlight-color;
box-shadow:3px 3px 4px #999999;
}
&::selection, &::selection:window-inactive {
background: $highlight-color;
box-shadow:3px 3px 4px #999999;
}
}
@import 'base';
@import 'mixins/highlight';
@import 'mixins/icons';
@import 'compass/css3/user-interface';
@import 'compass/layout/stretching';
......@@ -76,22 +75,23 @@ $base-font-size: 14px;
//HIGHLIGHTS////////////////////////////////
.annotator-highlights-always-on {
.annotator-hl {
@include highlight($highlight-color);
background-color: $highlight-color;
}
.annotator-hl .annotator-hl {
@include highlight($highlight-color-second);
background-color: $highlight-color-second;
}
.annotator-hl .annotator-hl .annotator-hl {
@include highlight($highlight-color-third);
background-color: $highlight-color-third;
}
}
.annotator-hl.annotator-hl-focused {
@include highlight($highlight-color-focus !important);
background-color: $highlight-color-focus !important;
.annotator-hl {
@include highlight(transparent !important);
background-color: transparent !important;
}
}
......
@import 'compass/css3/selection';
@mixin highlight($color) {
background: $color;
@include selection {
background: $color;
&:window-inactive {
background: $color;
}
}
}
......@@ -5,18 +5,6 @@
// PDFjs plugin provides a compatibility class to the PDFjs container that
// we can use to detect this.
.has-transparent-text-layer {
.annotator-hl {
&::-moz-selection {
background: rgba($highlight-color, 1);
}
&::-moz-selection, &::-moz-window-inactive, &::window-inactive {
background: rgba($highlight-color, 1);
}
&::selection, &::selection:window-inactive {
background: rgba($highlight-color, 1);
}
}
.annotator-highlights-always-on & .annotator-hl {
background: rgba($highlight-color, 1);
......@@ -29,8 +17,11 @@
}
}
.annotator-hl-focused,
.annotator-highlights-always-on & .annotator-hl.annotator-hl-focused {
background-color: rgba($highlight-color-focus, 1);
.annotator-hl.annotator-hl-focused {
background-color: rgb(192, 236, 253);
.annotator-hl {
background-color: transparent !important;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment