Skip to content

Commit

Permalink
MOD: Enhancements to Gemini scheme [7].
Browse files Browse the repository at this point in the history
1. Changed `margin-bottom` on `margin-top` in main blocks offsets & add siblings metod to detect blocks with offsets.
2. Rewrited shadows  in all blocks with offsets & added forgotten borders.
3. Removed unused (commented) values.
  • Loading branch information
ivan-nginx authored Sep 29, 2017
1 parent 00f7b64 commit 36a3e31
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions source/css/_schemes/Gemini/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,32 @@ use_seo = hexo-config('seo');
border-radius: initial;
}

// Post & comments blocks.
.post-block,
.comments {
margin-bottom: sboffset;
background: white;
// Post & Comments blocks.
.post-block {
padding: $content-desktop-padding;
background: white;
box-shadow: $box-shadow-inner;
border-radius: $border-radius-inner;
}

// Last post block in homepage (need to remove bottom margin to save style).
#posts > :last-child {
// When blocks are siblings (homepage).
#posts > article + article {
.post-block {
margin-bottom: initial;
margin-top: sboffset;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}
}

// Comments blocks.
.comments {
padding: $content-desktop-padding;
margin: initial;
margin-top: sboffset;
background: white;
box-shadow: $box-shadow;
border-radius: $border-radius;
}

// Top main padding from header to posts (default 40px).
Expand Down Expand Up @@ -84,6 +90,7 @@ use_seo = hexo-config('seo');
border-top: initial;
background: white;
box-shadow: $box-shadow;
border-radius: $border-radius;
padding: 10px 0 10px;
}

Expand Down Expand Up @@ -155,13 +162,22 @@ h6 {
}

.post-block {
margin-bottom: $content-tablet-padding;
// Inside posts blocks content padding (default 40px).
//padding: 20px;
padding: ($content-tablet-padding * 2);
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}

// Only if blocks are siblings need bottom margin (homepage).
#posts > article + article {
.post-block {
margin-top: $content-tablet-padding;
}
}

.comments {
margin-top: $content-tablet-padding;
padding: $content-tablet-padding ($content-tablet-padding * 2);
//padding: initial;
//padding-top: $content-tablet-padding;
Expand Down Expand Up @@ -195,15 +211,23 @@ h6 {
}

.post-block {
margin-bottom: $content-mobile-padding;
//width: 100%;
// Inside posts blocks content padding (default 40px).
//padding: $content-mobile-padding 0px;
padding: sboffset;
min-height: auto;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}

// Only if blocks are siblings need bottom margin (homepage).
#posts > article + article {
.post-block {
margin-top: $content-mobile-padding;
}
}

.comments {
margin-top: $content-mobile-padding;
padding: 0 sboffset;
}

Expand Down

0 comments on commit 36a3e31

Please sign in to comment.