mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Refactor .menu-item style
This commit is contained in:
parent
2195b01d8c
commit
6bf97f6e49
@ -36,18 +36,8 @@
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin-left: .35em;
|
||||
margin-top: .35em;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
|
||||
+mobile() {
|
||||
float: right;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -272,3 +272,12 @@ gemini-block-not-first() {
|
||||
margin-top: $content-mobile-padding;
|
||||
}
|
||||
}
|
||||
|
||||
menu-item-row() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.badge {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
+mobile() {
|
||||
text-align: left;
|
||||
menu-item-row();
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +39,7 @@
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
color: $black-light;
|
||||
margin-left: .35em;
|
||||
padding: 1px 4px;
|
||||
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
+mobile() {
|
||||
padding: 5px 10px;
|
||||
menu-item-row();
|
||||
}
|
||||
|
||||
&:hover, &.menu-item-active {
|
||||
@ -51,6 +52,7 @@
|
||||
.badge {
|
||||
background: $gainsboro;
|
||||
color: $black-light;
|
||||
margin-left: .35em;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,9 +10,8 @@
|
||||
|
||||
a {
|
||||
padding: 5px 20px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
transition-property: background-color;
|
||||
menu-item-row();
|
||||
}
|
||||
|
||||
+tablet-mobile() {
|
||||
@ -25,7 +24,6 @@
|
||||
background: $grey-light;
|
||||
border-radius: 10px;
|
||||
color: var(--content-bg-color);
|
||||
float: right;
|
||||
padding: 2px 5px;
|
||||
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user