Skip to content

Commit

Permalink
✨ Added full support for Supercharged Links v.1.1.1
Browse files Browse the repository at this point in the history
Fixed #51
  • Loading branch information
ceciliamay committed Feb 3, 2022
1 parent a8208ee commit 6eea393
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 75 deletions.
67 changes: 43 additions & 24 deletions obsidian.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion obsidian.css.map

Large diffs are not rendered by default.

100 changes: 50 additions & 50 deletions scss/30_note/_md-links.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*──────────Internal & External Links──────────*/
/* Source View Resolved Links */

.cm-s-obsidian span.cm {
&-url,
&-link:not(.cm-formatting-link),
&-link span.cm-underline,
&-hmd-internal-link,
&-hmd-internal-link span.cm-underline,
&-hmd-footnote.cm-link,
&-header.cm-hmd-internal-link {
span.cm {
&-url.cm-url,
&-blockid,
&-link:not(.cm-formatting),
&-underline:not(span[data-link-tags] .cm-underline),
&-inline-code.cm-link:not(.cm-formatting-code.cm-formatting),
&-hmd-footnote,
&-header.cm-hmd-internal-link,
&-hmd-internal-link.cm-hmd-internal-link {
color: var(--md-color-reslink);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;

Expand All @@ -18,68 +19,66 @@

&:hover {
color: var(--md-color-reslink-hover);
cursor: pointer;
}

&:active {
color: var(--md-color-reslink-active);
}
}

&-blockid {
color: var(--md-color-reslink);
text-underline-position: under;
text-decoration-thickness: 1px;

transition: var(--duration-superfast)
var(--motion-smooth);

&:hover {
color: var(--md-color-reslink-hover);
cursor: pointer;
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;
}

&:active {
color: var(--md-color-reslink-active);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;
}
}
}

/* Source View Unresolved Links */
.cm-s-obsidian span.is-unresolved span.cm {
&-link span.cm-underline,
&-hmd-internal-link,
&-hmd-internal-link span.cm-underline,
&-header.cm-hmd-internal-link {
color: var(--md-color-unreslink);
text-underline-position: under;
text-decoration-thickness: 1px;

transition: var(--duration-superfast)
var(--motion-smooth);

&:hover {
color: var(--md-color-unreslink-hover);
cursor: pointer;
}

&:active {
color: var(--md-color-unreslink-active);
/* Source View Resolved Links */
span.is-unresolved.is-unresolved {
span.cm {
&-url,
&-blockid,
&-link,
&-underline,
&-hmd-internal-link,
&-hmd-footnote {
color: var(--md-color-unreslink);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;

transition: var(--duration-superfast)
var(--motion-smooth);

&:hover {
color: var(--md-color-unreslink-hover);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;
}

&:active {
color: var(--md-color-unreslink-hover);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;
}
}
}
}

/* Preview Resolved Links */
a:not(a.footnote-link, a.tag, button.mod-cta a),
a:not(a.footnote-link, a.tag, button.mod-cta a, a.is-unresolved),
a code {
.modal &,
.view-content & {
color: var(--md-color-reslink);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;

transition: var(--duration-superfast)
var(--motion-smooth);
var(--motion-smooth);

&:hover {
color: var(--md-color-reslink-hover);
Expand All @@ -95,6 +94,7 @@ a code {
.internal-link,
.external-link {
color: var(--md-color-reslink);
text-decoration: underline;
text-underline-position: under;
text-decoration-thickness: 1px;

Expand Down
25 changes: 25 additions & 0 deletions scss/80_plugins-community/_supercharged-links.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*────────────────────────────────────
Supercharged Links
────────────────────────────────────*/
/* Supercharged Links Reset for Source View */
.cm-s-obsidian {
& span.cm-hmd-internal-link span[data-link-tags],
& span[data-link-tags] .cm-underline {
color: inherit;
text-decoration: inherit;
text-underline-position: inherit;
text-decoration-thickness: inherit;

transition: var(--duration-superfast)
var(--motion-smooth);
}
}

/* Supercharged Links Reset for Preview View */
.internal-link.data-link-icon {
color: inherit;

transition: var(--duration-superfast)
var(--motion-smooth);
}

1 change: 1 addition & 0 deletions scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
@use '80_plugins-community/calendar';
@use '80_plugins-community/sliding-panes';
@use '80_plugins-community/dataview';
@use '80_plugins-community/supercharged-links';
@use '80_plugins-community/style-settings__styling';
@use '80_plugins-community/style-settings__options';

0 comments on commit 6eea393

Please sign in to comment.