Skip to content

Commit

Permalink
fix: fix css when hover octotree leaf
Browse files Browse the repository at this point in the history
  • Loading branch information
misa198 committed Feb 16, 2022
1 parent 3a3389e commit 42c542b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/scripts/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { observe } from 'selector-observer';
import { detectBrowser } from './detectBrowser';
import { get } from './storage';
import { KEYS } from './keys';
import '../styles/file-icon.css';
import '../styles/icons.css';
import '../styles/octotree.css';
import '../styles/file-icon.css';

const fonts = [
{ name: 'FontAwesome', path: 'fonts/fontawesome.woff2' },
Expand Down
5 changes: 0 additions & 5 deletions src/styles/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@
.misa198-octotree-icon {
margin-right: 3px;
}

.misa198-octotree-icon-font::before {
margin-right: 3px;
font-family: file-icons !important;
}
19 changes: 19 additions & 0 deletions src/styles/octotree.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,22 @@
div {
color: var(--color-fg-default) !important;
}

.jstree-node.jstree-leaf:hover .jstree-icon.blob:before {
content: '' !important;
font-family: octotree !important;
font-size: 15px !important;
top: 0px !important;
width: 16px !important;
display: inline-block !important;
font-style: normal !important;
font-weight: 400 !important;
line-height: 1 !important;
position: relative !important;
text-align: center !important;
text-transform: none !important;
-webkit-font-smoothing: antialiased !important;
background-image: none !important;
color: rgb(172, 65, 66) !important !important;
font-variant: normal !important;
}
29 changes: 8 additions & 21 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,13 @@ const options = {
],
};

const env = process.env.NODE_ENV;

if (env === 'chromium') {
options.mode = 'production';
options.plugins.push(
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
}),
new TerserPlugin()
);
} else if (env !== 'firefox') {
options.mode = 'production';
options.plugins.push(
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
}),
new TerserPlugin()
);
}
options.mode = 'production';
options.plugins.push(
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false,
}),
new TerserPlugin()
);

module.exports = options;

0 comments on commit 42c542b

Please sign in to comment.