mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Optimize CSS selectors
This commit is contained in:
parent
afc770239a
commit
7384d0377c
@ -5,7 +5,7 @@ if (hexo-config('note.style') != 'disabled') {
|
||||
|
||||
border-radius: $note-border-radius;
|
||||
margin-bottom: 20px;
|
||||
padding: 1em 1em 0;
|
||||
padding: 1em;
|
||||
position: relative;
|
||||
|
||||
if ($note-style == 'simple') {
|
||||
@ -39,6 +39,14 @@ if (hexo-config('note.style') != 'disabled') {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
if ($note-icons) {
|
||||
&:not(.no-icon) {
|
||||
padding-left: 2.5em;
|
||||
|
||||
@ -166,26 +166,26 @@ round-icon($diameter) {
|
||||
|
||||
toggle-arrow($position) {
|
||||
if ($position == 'right') {
|
||||
.toggle-line:first-child {
|
||||
:first-child {
|
||||
top: 2px;
|
||||
transform: rotate(-45deg);
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.toggle-line:last-child {
|
||||
:last-child {
|
||||
top: -2px;
|
||||
transform: rotate(45deg);
|
||||
width: 50%;
|
||||
}
|
||||
} else {
|
||||
.toggle-line:first-child {
|
||||
:first-child {
|
||||
left: 50%;
|
||||
top: 2px;
|
||||
transform: rotate(45deg);
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.toggle-line:last-child {
|
||||
:last-child {
|
||||
left: 50%;
|
||||
top: -2px;
|
||||
transform: rotate(-45deg);
|
||||
@ -195,27 +195,27 @@ toggle-arrow($position) {
|
||||
}
|
||||
|
||||
toggle-close($position) {
|
||||
.toggle-line:nth-child(2) {
|
||||
:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
if ($position == 'right') {
|
||||
.toggle-line:first-child {
|
||||
:first-child {
|
||||
top: 6px;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.toggle-line:last-child {
|
||||
:last-child {
|
||||
top: -6px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
} else {
|
||||
.toggle-line:first-child {
|
||||
:first-child {
|
||||
top: 6px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.toggle-line:last-child {
|
||||
:last-child {
|
||||
top: -6px;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user