mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Refactor @extend
This commit is contained in:
parent
61048546ca
commit
1be8cbb18b
@ -132,7 +132,7 @@ if (hexo-config('algolia_search.enable')) {
|
||||
}
|
||||
|
||||
.current .page-number {
|
||||
@extend .pagination .page-number.current;
|
||||
@extend $page-number-current;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
@ -10,10 +10,6 @@
|
||||
background: $sidebar-highlight;
|
||||
}
|
||||
|
||||
// Fix issue #75
|
||||
// @extends does not seem to work inside @media
|
||||
// So we use a mixin here
|
||||
// https://github.com/stylus/stylus/issues/609
|
||||
@media (any-hover: hover) {
|
||||
body:not(.sidebar-active) .sidebar-toggle:hover {
|
||||
toggle-arrow(hexo-config('sidebar.position'));
|
||||
|
||||
@ -26,6 +26,24 @@ $code-block {
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
$figcaption {
|
||||
background: var(--highlight-gutter-background);
|
||||
color: var(--highlight-foreground);
|
||||
display: flow-root;
|
||||
font-size: $table-font-size;
|
||||
line-height: 1.2;
|
||||
padding: .5em;
|
||||
|
||||
a {
|
||||
color: var(--highlight-foreground);
|
||||
float: right;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--highlight-foreground);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: $code-font-family;
|
||||
}
|
||||
@ -72,21 +90,7 @@ figure.highlight {
|
||||
}
|
||||
|
||||
figcaption {
|
||||
background: var(--highlight-gutter-background);
|
||||
color: var(--highlight-foreground);
|
||||
display: flow-root;
|
||||
font-size: $table-font-size;
|
||||
line-height: 1.2;
|
||||
padding: .5em;
|
||||
|
||||
a {
|
||||
color: var(--highlight-foreground);
|
||||
float: right;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--highlight-foreground);
|
||||
}
|
||||
}
|
||||
@extend $figcaption;
|
||||
}
|
||||
|
||||
.gutter {
|
||||
@ -109,7 +113,7 @@ figure.highlight {
|
||||
|
||||
// See https://github.com/hexojs/hexo-util/pull/229
|
||||
pre .caption, pre figcaption {
|
||||
@extend figure.highlight figcaption;
|
||||
@extend $figcaption;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,12 @@ $page-number-basic {
|
||||
}
|
||||
}
|
||||
|
||||
$page-number-current {
|
||||
background: $pagination-active-bg;
|
||||
border-color: $pagination-active-border;
|
||||
color: $pagination-active-color;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
border-top: 1px solid $pagination-border;
|
||||
margin: 120px 0 0;
|
||||
@ -44,8 +50,6 @@ $page-number-basic {
|
||||
}
|
||||
|
||||
.page-number.current {
|
||||
background: $pagination-active-bg;
|
||||
border-color: $pagination-active-border;
|
||||
color: $pagination-active-color;
|
||||
@extend $page-number-current;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user