Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
23075dca
Commit
23075dca
authored
Nov 02, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Nov 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend highlight CSS to support clustered highlights
parent
afa82e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
1 deletion
+68
-1
highlights.scss
src/styles/annotator/highlights.scss
+68
-1
No files found.
src/styles/annotator/highlights.scss
View file @
23075dca
...
...
@@ -7,6 +7,27 @@
--hypothesis-highlight-second-color
:
rgba
(
206
,
206
,
60
,
0
.4
);
--hypothesis-highlight-third-color
:
transparent
;
// Colors available for clustered highlights
--hypothesis-color-blue
:
#e0f2fe
;
--hypothesis-color-yellow
:
#fef9c3
;
--hypothesis-color-purple
:
#ede9fe
;
--hypothesis-color-orange
:
#ffedd5
;
--hypothesis-color-green
:
#d1fae5
;
--hypothesis-color-grey
:
#f5f5f4
;
--hypothesis-color-pink
:
#ffe4e6
;
// Clustered highlight styling configuration
// These values are updated by the `highlight-clusters` module
--hypothesis-cluster-blend-mode
:
multiply
;
--hypothesis-other-content-color
:
var
(
--
hypothesis-color-yellow
);
--hypothesis-other-content-decoration
:
none
;
--hypothesis-user-highlights-color
:
var
(
--
hypothesis-color-yellow
);
--hypothesis-user-highlights-decoration
:
none
;
--hypothesis-user-annotations-color
:
var
(
--
hypothesis-color-yellow
);
--hypothesis-user-annotations-decoration
:
none
;
}
// Configure highlight styling.
...
...
@@ -33,6 +54,52 @@
}
}
// Configure clustered highlight styling. The `.hypothesis-highlights-clustered`
// class is managed by `highlight-clusters`
.hypothesis-highlights-clustered
.hypothesis-highlight
{
// When clustered highlights are active, use an opaque blue for focused
// annotations so we don't end up with a funny color mix
--highlight-color-focused
:
var
(
--
hypothesis-color-blue
);
&
.user-annotations
{
--highlight-color
:
var
(
--
hypothesis-user-annotations-color
);
--highlight-decoration
:
var
(
--
hypothesis-user-annotations-decoration
);
&
>
.user-annotations
{
--highlight-color
:
var
(
--
hypothesis-user-annotations-color
);
--highlight-blend-mode
:
var
(
--
hypothesis-cluster-blend-mode
);
}
}
&
.user-highlights
{
--highlight-color
:
var
(
--
hypothesis-user-highlights-color
);
--highlight-decoration
:
var
(
--
hypothesis-user-highlights-decoration
);
&
>
.user-highlights
{
--highlight-color
:
var
(
--
hypothesis-user-highlights-color
);
--highlight-blend-mode
:
var
(
--
hypothesis-cluster-blend-mode
);
}
}
&
.other-content
{
--highlight-color
:
var
(
--
hypothesis-other-content-color
);
--highlight-decoration
:
var
(
--
hypothesis-other-content-decoration
);
&
>
.other-content
{
--highlight-color
:
var
(
--
hypothesis-other-content-color
);
--highlight-blend-mode
:
var
(
--
hypothesis-cluster-blend-mode
);
}
}
}
// No matter what kind of highlight styling is applied, make sure nested
// highlights don't pile up too high with blending.
.hypothesis-highlight
{
&
&
&
&
&
{
--highlight-blend-mode
:
normal
;
}
}
// Apply highlight styling.
// Highlights are non-visible when .hypothesis-highlight-always-on class not present.
...
...
@@ -50,7 +117,7 @@
}
// Apply styling using `--highlight-` values when highlights are visible
// The `.hypothesis-highlights-always-on` class is managed by `highlighter`
.hypothesis-highlights-always-on
.hypothesis-svg-highlight
{
fill
:
var
(
--
highlight-color
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment