-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent.css
More file actions
125 lines (109 loc) · 2.69 KB
/
Copy pathcontent.css
File metadata and controls
125 lines (109 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* CSS Highlight API - Primary method (works across different element types) */
/* Matches highlights registered with CSS.highlights.set('floatnote-highlight-*', highlight) */
::highlight(floatnote-highlight) {
background-color: hsla(46, 100%, 50%, 0.544);
color: inherit;
padding: 2px 0;
transition: opacity 0.2s;
}
/* Dim highlight on hover */
::highlight(floatnote-highlight):hover {
opacity: 0.3;
}
/* Note: CSS Highlight API uses attribute selectors, so we need to match the pattern */
/* For dynamic highlight names, we can use a more general approach */
/* Fallback: Using <span> element for browsers without CSS Highlight API support */
span.floatnote-highlight,
.floatnote-highlight {
display: inline !important;
white-space: normal !important;
line-height: inherit !important;
vertical-align: baseline !important; /* Ensure proper alignment */
background-color: hsl(46, 100%, 51%) !important;
padding: 2px 0 !important;
cursor: default !important;
transition: background-color 0.2s;
color: inherit !important; /* Preserve text color */
font-weight: inherit !important; /* Preserve font weight */
}
span.floatnote-highlight:hover,
.floatnote-highlight:hover {
background-color: hsla(46, 100%, 51%, 0.709) !important;
opacity: 0.7;
}
/* Highlight Toolbar */
.highlight-toolbar {
position: fixed;
display: flex;
gap: 4px;
background: white;
border: 2px solid #000;
border-radius: 4px;
padding: 3px;
box-shadow: 2px 2px 0 #000;
z-index: 100001;
pointer-events: auto;
}
.highlight-toolbar-btn {
background: white;
border: none;
border-radius: 4px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
transition: all 0.2s;
padding: 0;
box-sizing: border-box;
border: 2px solid #000;
}
.highlight-toolbar-btn.color-btn {
padding: 1px;
}
.highlight-toolbar-btn:hover {
background: #fffa64;
transform: scale(1.1);
}
.highlight-toolbar-btn.delete-btn:hover {
background: #fe99a8;
}
.highlight-toolbar-btn .fa-solid {
font-size: 14px;
color: #000;
}
.color-palette-box {
width: 100%;
height: 100%;
border-radius: 3px;
display: block;
box-sizing: border-box;
}
/* Color Picker */
.highlight-color-picker {
position: fixed;
display: flex;
gap: 4px;
background: white;
border: 2px solid #000;
border-radius: 8px;
padding: 4px;
box-shadow: 2px 2px 0 #000;
z-index: 100002;
pointer-events: auto;
}
.color-option {
width: 20px;
height: 20px;
border: 2px solid #000;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
padding: 0;
}
.color-option:hover {
transform: scale(1.2);
box-shadow: 0 0 0 2px white, 0 0 0 4px #000;
}