Skip to content

Commit cd91c3c

Browse files
committed
Broke out annotation and highlight styles 🎨
Setting a bg color for the highlight obscured the image underneath. CSS is clunky because I'm not using multiple classes per note/highlight. It's not clear whether that's even possible, and in any case it would make the manifest less readable to use the cascade and have more compact CSS
1 parent 27a18b2 commit cd91c3c

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

‎recipe/0045-css/manifest.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"body": {
5858
"id": "{{ id.path }}/body/sr1",
5959
"type": "SpecificResource",
60-
"styleClass": "author1",
60+
"styleClass": "author1note",
6161
"source": {
6262
"id": "{{ id.path }}/body/text1",
6363
"type": "TextualBody",
@@ -69,7 +69,7 @@
6969
"target": {
7070
"type": "SpecificResource",
7171
"source": "{{ id.path }}/canvas/p1",
72-
"styleClass": "author2",
72+
"styleClass": "author2highlight",
7373
"selector": {
7474
"type": "FragmentSelector",
7575
"value": "xywh=700,1250,1850,1150"
@@ -84,7 +84,7 @@
8484
"body": {
8585
"id": "{{ id.path }}/body/sr2",
8686
"type": "SpecificResource",
87-
"styleClass": "author2",
87+
"styleClass": "author2note",
8888
"source": {
8989
"id": "{{ id.path }}/body/text2",
9090
"type": "TextualBody",
@@ -96,7 +96,7 @@
9696
"target": {
9797
"type": "SpecificResource",
9898
"source": "{{ id.path }}/canvas/p1",
99-
"styleClass": "author2",
99+
"styleClass": "author2highlight",
100100
"selector": {
101101
"type": "FragmentSelector",
102102
"value": "xywh=170,160,2200,1000"

‎recipe/0045-css/style.css‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
.author1 {
1+
.author1note {
22
color: #f00;
33
background-color: #fff;
44
border-color: #f00;
55
}
66

7-
.author2 {
7+
.author1highlight {
8+
color: #f00;
9+
border-color: #f00;
10+
}
11+
12+
.author2note {
813
color: #1a1;
914
background-color: #fff;
1015
border-color: #0f0;
11-
}
16+
}
17+
18+
.author1highlight {
19+
color: #0f0;
20+
border-color: #0f0;
21+
}

0 commit comments

Comments
 (0)