Skip to content

Commit 1086bc9

Browse files
committed
vocab
1 parent 8f32371 commit 1086bc9

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

_sass/custom/custom.scss

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,71 @@
11
// custom SCSS (or CSS) goes here
2+
3+
// Vocabulary term link styles
4+
.vocab-term-link {
5+
position: relative;
6+
display: inline;
7+
border-bottom: 1px dashed #2563eb;
8+
color: inherit;
9+
text-decoration: none;
10+
cursor: help;
11+
12+
&::after {
13+
content: "📚";
14+
font-size: 0.75em;
15+
vertical-align: super;
16+
margin-left: 0.1em;
17+
opacity: 0.7;
18+
}
19+
20+
&:hover {
21+
color: #2563eb;
22+
border-bottom: 1px solid #2563eb;
23+
24+
&::before {
25+
content: attr(title);
26+
position: absolute;
27+
bottom: 100%;
28+
left: 0;
29+
background-color: #f8f9fa;
30+
border: 1px solid #dee2e6;
31+
border-radius: 4px;
32+
padding: 0.5rem;
33+
width: 250px;
34+
font-size: 0.875rem;
35+
color: #212529;
36+
z-index: 100;
37+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
38+
pointer-events: none;
39+
white-space: normal;
40+
}
41+
}
42+
}
43+
44+
// Fix for paragraph breaks with vocab links
45+
p {
46+
.vocab-term-link {
47+
display: inline;
48+
white-space: normal;
49+
vertical-align: baseline;
50+
line-height: inherit;
51+
}
52+
}
53+
54+
// Fix for line breaks with vocab links
55+
p, li, h1, h2, h3, h4, h5, h6 {
56+
a.vocab-term-link {
57+
display: inline;
58+
white-space: normal;
59+
vertical-align: baseline;
60+
line-height: inherit;
61+
}
62+
}
63+
64+
// Dark mode support
65+
.dark .vocab-term-link {
66+
&:hover::before {
67+
background-color: #212529;
68+
border-color: #495057;
69+
color: #e9ecef;
70+
}
71+
}

0 commit comments

Comments
 (0)