Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert using one line macro #1033

Merged
merged 3 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/css/_common/components/back-to-top-sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&:hover { opacity: $b2t-opacity-hover; }

+tablet-mobile() {
hide() if not hexo-config('sidebar.onmobile');
display: none if not hexo-config('sidebar.onmobile');
}

&.back-to-top-on {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/buttons.styl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

.btn-bar {
show();
display: block;
width: 22px;
height: 2px;
background: $text-color;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/header/menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

a, span.exturl {
show();
display: block;
font-size: $font-size-smaller;
line-height: inherit;
border-bottom: 1px solid $menu-link-border;
Expand Down
6 changes: 3 additions & 3 deletions source/css/_common/components/header/site-nav.styl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.site-nav-toggle {
hide();
display: none;
position: absolute;
left: 10px;
+mobile() {
show();
display: block;
}

button {
Expand All @@ -16,7 +16,7 @@

.site-nav {
+mobile() {
hide();
display: none;
margin: 0 -10px;
padding: 0 10px;
clear: both;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/pages/archive.styl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
background: $black-light;
border: 1px solid white;

circle();
border-radius: 50%;
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/pages/schedule.styl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
color: #bbb;
}
span.event-details {
show();
display: block;
color: #bbb;
margin-left: 56px;
padding-top: 3px;
Expand Down
6 changes: 3 additions & 3 deletions source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
margin: 0 20px;

.post-title, .post-meta {
show();
display: block;
width: auto;
text-align: left;
}
Expand Down Expand Up @@ -49,7 +49,7 @@
width: 8px;
height: 8px;
background: $grey;
circle();
border-radius: 50%;
}
}

Expand All @@ -70,7 +70,7 @@
height: 6px;
margin-left: -4px;
background: $grey;
circle();
border-radius: 50%;
border: 1px solid white;
the-transition();
transition-property: background;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-eof.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

.post:last-child {
.post-eof {
hide();
display: none;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@

.post-meta-item-text {
+tablet-mobile() {
hide();
display: none;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-nav.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

a {
position: relative;
show();
display: block;
line-height: 1.6;
font-size: $font-size-small;
color: $link-color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
top: 0;
left: 0;
z-index: 9999;
show();
display: block;
width: 0;
height: unquote(hexo-config('reading_progress.height'));
background: unquote(hexo-config('reading_progress.color'));
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-type.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.post-type-quote {
.post-header,
.post-tags {
hide();
display: none;
}

blockquote {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/rainbow.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body {
z-index: 2147483647;
position: fixed;
content: "";
show();
display: block;
transform: translateY(-99.99px);
background: linear-gradient(124deg,
#FF0000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
content: " ";
width: 4px;
height: 4px;
circle();
border-radius: 50%;
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/sidebar/sidebar-author.styl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.site-author-image {
show();
display: block;
margin: 0 auto;
padding: $site-author-image-padding;
max-width: $site-author-image-width;
height: $site-author-image-height;
border: $site-author-image-border-width solid $site-author-image-border-color;
circle() if hexo-config('avatar.rounded');
border-radius: 50% if hexo-config('avatar.rounded');
}

if hexo-config('avatar.rotated') {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/components/sidebar/sidebar-dimmer.styl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#sidebar-dimmer {
hide();
display: none;
}
+mobile() {
#sidebar-dimmer {
show();
display: block;
position: fixed;
z-index: $zindex-2;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/sidebar-toc.styl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
.post-toc .nav .active > .nav-child { display: block; }

.post-toc .nav .active-current > .nav-child {
show();
display: block;
& > .nav-item { display: block; }
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/sidebar-toggle.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
+tablet-mobile() {
opacity: $b2t-opacity-hover;
right: $b2t-position-right-mobile;
hide() if not hexo-config('sidebar.onmobile');
display: none if not hexo-config('sidebar.onmobile');
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

+tablet-mobile() {
hide() if not hexo-config('sidebar.onmobile');
display: none if not hexo-config('sidebar.onmobile');
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/site-state.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

.site-state-item-count {
show();
display: block;
text-align: center;
color: $site-state-item-count-color;
font-weight: $font-weight-bold;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/tags/blockquote-center.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&::before, &::after {
position: absolute;
content: ' ';
show();
display: block;
width: 100%;
height: 24px;
opacity: 0.2;
Expand Down
10 changes: 5 additions & 5 deletions source/css/_common/components/tags/tabs.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.post-body .tabs {
position: relative;
show();
display: block;
margin-bottom: 20px;
padding-top: 10px;

Expand All @@ -15,7 +15,7 @@
margin-bottom: -1px;

+mobile-smallest() {
show();
display: block;
margin-bottom: 5px;
}

Expand Down Expand Up @@ -45,7 +45,7 @@
text-align: center;
outline: 0;
border-bottom: initial;
show();
display: block;
line-height: 1.8em;
padding: .25em .75em;
& i { width: (18em / 14); }
Expand Down Expand Up @@ -81,10 +81,10 @@
if tbr > 0 { border-radius: tbr; }

&:not(.active) {
hide();
display: none;
}
&.active {
show();
display: block;
if tbr > 0 {
&:nth-of-type(1) {
border-radius: 0 tbr tbr tbr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
z-index: 2080
background-color: rgba(0, 0, 0, 0.3)
+mobile()
hide();
display: none;

.algolia-popup
overflow: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
margin-bottom: 10px;
font-size: $font-size-headings-base;
border-bottom: 1px solid $gainsboro;
show();
display: block;
}

ul.popular-posts {
Expand Down
4 changes: 2 additions & 2 deletions source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ a, span.exturl {

video {
max-width: 100%;
show();
display: block;
margin-left: auto;
margin-right: auto;
}

img {
show();
display: block;
margin: auto;
max-width: 100%;
height: auto;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/scaffolding/helpers.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Center-align a block level element.
.center-block {
show();
display: block;
margin-left: auto;
margin-right: auto;
}
Expand Down
6 changes: 3 additions & 3 deletions source/css/_mixins/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ desktop-largest() {
}
}

circle() {
border-radius: 50% {
border-radius: 50%;
}

hide() {
display: none {
display: none;
}

show() {
display: block {
display: block;
}
stevenjoezhang marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
2 changes: 1 addition & 1 deletion source/css/_schemes/Gemini/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ use_seo = hexo-config('seo');

// Post delimiters.
.post-eof {
hide();
display: none;
}

// Pagination.
Expand Down
6 changes: 3 additions & 3 deletions source/css/_schemes/Mist/_header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
justify-content: center;

+mobile() {
show();
display: block;
width: auto;
padding: 10px;
}
Expand Down Expand Up @@ -40,7 +40,7 @@

.logo-line-before,
.logo-line-after {
show();
display: block;
overflow: hidden;
margin: 0 auto;
width: 75%;
Expand All @@ -49,7 +49,7 @@

i {
position: relative;
show();
display: block;
height: 2px;
background: $black-deep;
+mobile() { height: 3px; }
Expand Down
4 changes: 2 additions & 2 deletions source/css/_schemes/Mist/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.menu-item {
margin: 0;
+mobile() {
show();
display: block;
margin-top: 5px;
}

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

a::before {
hide();
display: none;
+mobile() { display: block; }
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_schemes/Muse/_layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

// embed tag
embed {
show();
display: block;
margin: 0px auto 25px auto;
}
2 changes: 1 addition & 1 deletion source/css/_schemes/Muse/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

.menu .menu-item {
+mobile() {
show();
display: block;
margin: 0 10px;
vertical-align: top;
}
Expand Down
Loading