2026-05-12 20:10:46 +00:00
|
|
|
/*
|
2026-05-13 11:54:44 +00:00
|
|
|
* Visual indicator for obsidian://copy protocol links.
|
|
|
|
|
*/
|
2026-05-12 20:10:46 +00:00
|
|
|
|
2026-05-13 12:35:44 +00:00
|
|
|
/* ── Reading View (Standard Links) ── */
|
|
|
|
|
|
|
|
|
|
a[href^="obsidian://copy"]::after {
|
2026-05-13 11:54:44 +00:00
|
|
|
content: "";
|
|
|
|
|
display: inline-block;
|
2026-05-13 12:35:44 +00:00
|
|
|
width: 0.85em;
|
|
|
|
|
height: 0.85em;
|
|
|
|
|
margin-left: 5px;
|
2026-05-13 11:54:44 +00:00
|
|
|
vertical-align: middle;
|
|
|
|
|
background-color: currentColor;
|
|
|
|
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E");
|
|
|
|
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E");
|
2026-05-13 12:35:44 +00:00
|
|
|
-webkit-mask-size: contain;
|
2026-05-13 11:54:44 +00:00
|
|
|
mask-size: contain;
|
2026-05-13 12:35:44 +00:00
|
|
|
-webkit-mask-repeat: no-repeat;
|
2026-05-13 11:54:44 +00:00
|
|
|
mask-repeat: no-repeat;
|
2026-05-13 12:35:44 +00:00
|
|
|
opacity: 0.8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a[href^="obsidian://copy"]:hover::after {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ── Live Preview (Managed by ViewPlugin Widget) ── */
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Hide Obsidian's default external link icon on the same line as our copy links.
|
|
|
|
|
* We still use the .copy-protocol-link mark for this.
|
|
|
|
|
*/
|
|
|
|
|
.cm-line:has(.copy-protocol-link) .external-link,
|
|
|
|
|
.cm-line:has(.copy-protocol-link) .cm-url.external-link,
|
|
|
|
|
.cm-line:has(.copy-protocol-link) .cm-widgetBuffer + .external-link {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Ensure the link text looks like a link */
|
|
|
|
|
.copy-protocol-link {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
text-underline-offset: 2px;
|
2026-05-13 11:54:44 +00:00
|
|
|
}
|
2026-05-12 20:10:46 +00:00
|
|
|
|
2026-05-13 12:35:44 +00:00
|
|
|
/* Copy cursor on hover */
|
|
|
|
|
.copy-protocol-link:hover,
|
2026-05-13 11:54:44 +00:00
|
|
|
a[href^="obsidian://copy"]:hover {
|
2026-05-13 12:35:44 +00:00
|
|
|
cursor: copy !important;
|
2026-05-13 11:54:44 +00:00
|
|
|
}
|