Skip to content

Commit

Permalink
Use @require instead of @import
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Jul 30, 2020
1 parent fc68fbe commit 33723be
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
7 changes: 4 additions & 3 deletions source/css/_common/components/post/post-followme.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
display: flex;
flex-wrap: wrap;

.social-item {
margin: .5em 2em;
}
+tablet-mobile() {
.social-item {
margin: .5em .75em;
}
}

.social-item {
margin: .5em 2em;
}

.social-link {
border: 0;
display:inline-block;
Expand Down
4 changes: 1 addition & 3 deletions source/css/_common/components/post/post-nav.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.post-nav {
border-top: 1px solid $gainsboro;
display: flex;
gap: 30px;
justify-content: space-between;
margin-top: 15px;
padding: 10px 5px 0;
Expand All @@ -25,15 +26,12 @@
}

&:first-child {
margin-right: 15px;

.fa {
margin-right: 5px;
}
}

&:last-child {
margin-left: 15px;
text-align: right;

.fa {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/post/post-reward.styl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

if (hexo-config('reward_settings.animation')) {
&:hover p {
animation: roll .1s infinite linear;
animation: next-roll .1s infinite linear;
// The animation may affect :hover of img in dark mode
pointer-events: none;
}
Expand All @@ -52,7 +52,7 @@
}
}

@keyframes roll {
@keyframes next-roll {
from {
transform: rotateZ(30deg);
}
Expand Down
13 changes: 7 additions & 6 deletions source/css/_common/scaffolding/highlight/highlight.styl
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
@import hexo-config('highlight.light.file') if (hexo-config('highlight.enable'));
// Use `@require` to fix issue #67
@require hexo-config('highlight.light.file') if (hexo-config('highlight.enable'));
if (hexo-config('prism.enable')) {
@import hexo-config('prism.light');
@import hexo-config('prism.number');
@require hexo-config('prism.light');
@require hexo-config('prism.number');
}

if (hexo-config('darkmode')) {
@media (prefers-color-scheme: dark) {
@import hexo-config('highlight.dark.file') if (hexo-config('highlight.enable'));
@import hexo-config('prism.dark') if (hexo-config('prism.enable'));
@require hexo-config('highlight.dark.file') if (hexo-config('highlight.enable'));
@require hexo-config('prism.dark') if (hexo-config('prism.enable'));
}
}

@import 'copy-code' if (hexo-config('codeblock.copy_button.enable'));
@require 'copy-code' if (hexo-config('codeblock.copy_button.enable'));

// Placeholder: $code-inline $code-block
$code-inline {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/scaffolding/tags/link-grid.styl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
transition: background .3s;

&:hover {
animation: shake .5s;
animation: next-shake .5s;
background: var(--card-bg-color);
}

Expand Down Expand Up @@ -67,7 +67,7 @@
}
}

@keyframes shake {
@keyframes next-shake {
0% {
transform: translate(1pt, 1pt) rotate(0deg);
}
Expand Down

1 comment on commit 33723be

@stevenjoezhang
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.