Skip to content

Commit

Permalink
Optimize stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Oct 6, 2019
1 parent 0233a29 commit a532782
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 45 deletions.
2 changes: 1 addition & 1 deletion source/css/_common/components/back-to-top.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
position: fixed;
text-align: center;
transition-property: bottom;
z-index: $zindex-5;
z-index: $zindex-3;
the-transition();

if (hexo-config('back2top.scrollpercent')) {
Expand Down
8 changes: 4 additions & 4 deletions source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.posts-collapse {
margin-left: $posts-collapse-margin;
position: relative;
z-index: $zindex-1;

+mobile() {
margin-left: $posts-collapse-margin-mobile;
Expand Down Expand Up @@ -46,7 +45,9 @@
}

.collection-header {
display: inline-block;
margin: 0 0 0 20px;

small {
color: $grey;
margin-left: 5px;
Expand All @@ -56,9 +57,10 @@
.post-header {
border-bottom: 1px dashed $grey-light;
margin: 30px 0;
padding-left: 15px;
position: relative;
the-transition();
transition-property: border;
the-transition();

&::before {
background: $grey;
Expand Down Expand Up @@ -87,7 +89,6 @@
.post-meta {
display: inline;
font-size: $font-size-smallest;
margin-left: 15px;
margin-right: 10px;
}

Expand All @@ -113,7 +114,6 @@
position: absolute;
top: 1.25em;
width: 4px;
z-index: $zindex-bottom;
}

.fa-external-link {
Expand Down
1 change: 1 addition & 0 deletions source/css/_common/components/post/post-header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

time {
border-bottom: 1px dashed $grey-dark;
cursor: pointer;
}
}

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 @@ -30,7 +30,7 @@ body {
right: 0;
top: 0;
transform: translateY(-99.99px);
z-index: 2147483647;
z-index: $zindex-5;
}
}

Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/reading-progress.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
top: 0;
}
width: 0;
z-index: 9999;
z-index: $zindex-5;
}
4 changes: 2 additions & 2 deletions source/css/_common/components/third-party/search.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
position: fixed;
top: 0;
width: 100%;
z-index: 2080;
z-index: $zindex-4;
}

.search-popup {
Expand All @@ -22,7 +22,7 @@
position: fixed;
top: 10%;
width: 700px;
z-index: 9999;
z-index: $zindex-5;

+mobile() {
border-radius: 0;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/outline/sidebar/sidebar-dimmer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
position: fixed;
top: 0;
width: 100%;
z-index: $zindex-2;
z-index: $zindex-1;
}

.sidebar-active + #sidebar-dimmer {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/outline/sidebar/sidebar-toc.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
}

a {
the-transition();
border-bottom-color: $toc-link-border-color;
color: $toc-link-color;
transition-property: all;
the-transition();

&:hover {
border-bottom-color: $toc-link-hover-border-color;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/outline/sidebar/sidebar-toggle.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding: 5px;
position: fixed;
width: 14px;
z-index: $zindex-5;
z-index: $zindex-3;

+tablet-mobile() {
left: $b2t-position-right-mobile;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/outline/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
box-shadow: inset 0 2px 6px black;
position: fixed;
top: 0;
z-index: $zindex-4;
z-index: $zindex-2;

a, span.exturl {
border-bottom-color: $black-light;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/scaffolding/buttons.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
line-height: 2;
padding: 0 20px;
text-decoration: none;
the-transition();
transition-property: background-color;
the-transition();

&:hover {
background: $btn-default-hover-bg;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_schemes/Gemini/index.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../Pisces/_layout';
@import '../Pisces/_brand';
@import '../Pisces/_header';
@import '../Pisces/_menu';
@import '../Pisces/_sub-menu';
@import '../Pisces/_sidebar';
Expand Down
4 changes: 4 additions & 0 deletions source/css/_schemes/Mist/_header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@
right: -100%;
}
}

.site-subtitle {
display: none;
}
3 changes: 0 additions & 3 deletions source/css/_schemes/Mist/_logo.styl

This file was deleted.

12 changes: 0 additions & 12 deletions source/css/_schemes/Mist/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,4 @@
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
}
}

a::before {
display: none;

+mobile() {
display: block;
}
}

+mobile() {
float: none;
}
}
File renamed without changes.
7 changes: 4 additions & 3 deletions source/css/_schemes/Muse/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
margin: 0;
padding: 0;
width: 100%;
z-index: $zindex-3;
}
}

Expand All @@ -21,11 +20,11 @@
}

.menu-item-active a {
border-bottom: 1px solid $menu-link-hover-border;
border-bottom: 1px solid $menu-link-hover-border !important;
color: $black-deep;

+mobile() {
border-bottom: 1px dotted $gray-lighter;
border-bottom: 1px dotted $gray-lighter !important;
}
}

Expand All @@ -37,6 +36,8 @@
}

a, span.exturl {
border-bottom: 1px solid transparent;

+mobile() {
padding: 5px 10px;
}
Expand Down
6 changes: 3 additions & 3 deletions source/css/_schemes/Muse/index.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '_layout.styl';
@import '_logo.styl';
@import '_menu.styl';
@import '_layout';
@import '_header';
@import '_menu';
@import '_sidebar';
File renamed without changes.
2 changes: 0 additions & 2 deletions source/css/_schemes/Pisces/_menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

.menu-item-active a {
background: #f9f9f9;
border-bottom-color: white;

if (!hexo-config('menu_settings.badges')) {
&::after {
Expand All @@ -48,7 +47,6 @@
position: relative;
text-align: left;
transition-property: background-color;
the-transition();

&:hover {
@extend .menu-item-active a;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_schemes/Pisces/index.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '_layout';
@import '_brand';
@import '_header';
@import '_menu';
@import '_sub-menu';
@import '_sidebar';
11 changes: 5 additions & 6 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ $line-height-code-block = 1.6; // Can't be less than 1.3;

// Z-index master list
// --------------------------------------------------
$zindex-bottom = -1;
$zindex-1 = 1010;
$zindex-2 = 1020;
$zindex-3 = 1030;
$zindex-4 = 1040;
$zindex-5 = 1050;
$zindex-1 = 100;
$zindex-2 = 200;
$zindex-3 = 300;
$zindex-4 = 400;
$zindex-5 = 500;


// Table
Expand Down

0 comments on commit a532782

Please sign in to comment.