Skip to content

Commit

Permalink
fix: bulti-in icons now display properly in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenlx committed Nov 16, 2021
1 parent 7c13804 commit 5f631ab
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
20 changes: 20 additions & 0 deletions src/icon-packs/icon.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
img.isc-icon {
display: inline;
height: 1em;
width: 1em;
vertical-align: text-top;
.markdown-preview-view &,
.markdown-source-view & {
height: var(--editor-font-size);
width: var(--editor-font-size);
}
.theme-dark & {
&.isc-fab,
&.isc-far,
&.isc-fas,
&.isc-rif,
&.isc-ril {
filter: invert(1);
}
}
}
2 changes: 2 additions & 0 deletions src/icon-packs/pack-manager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "./icon.less";

import cls from "classnames";
import Fuse from "fuse.js";
import getMd5 from "md5";
Expand Down
2 changes: 0 additions & 2 deletions src/isc-main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "./main.less";

import { Plugin } from "obsidian";
import { DEFAULT_SETTINGS, IconSCSettings, IconSCSettingTab } from "settings";

Expand Down
27 changes: 0 additions & 27 deletions src/main.less

This file was deleted.

14 changes: 14 additions & 0 deletions src/modules/suggester.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.isc.suggestion-container .suggestion-item {
display: flex;
place-content: space-between;

.shortcode {
margin-right: 8px;
}
img.isc-icon {
display: inline;
height: var(--font-normal);
width: var(--font-normal);
}
}

2 changes: 2 additions & 0 deletions src/modules/suggester.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "./suggester.less";

import {
Editor,
EditorPosition,
Expand Down

0 comments on commit 5f631ab

Please sign in to comment.