forked from theme-next/hexo-theme-next
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor sidebar-dimmer (theme-next#964)
- Loading branch information
1 parent
51fba3f
commit 5cb8936
Showing
5 changed files
with
65 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 17 additions & 13 deletions
30
source/css/_common/components/sidebar/sidebar-dimmer.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
.sidebar-active + #sidebar-dimmer { | ||
+mobile() { | ||
#sidebar-dimmer { | ||
hide(); | ||
} | ||
+mobile() { | ||
#sidebar-dimmer { | ||
show(); | ||
position: fixed; | ||
z-index: $zindex-2; | ||
top: 0; | ||
left: 100%; | ||
width: 100%; | ||
height: 100%; | ||
background: #000; | ||
opacity: 0; | ||
} | ||
.sidebar-active + #sidebar-dimmer { | ||
opacity: .7; | ||
transition: opacity .5s; | ||
transform: translateX(-100%); | ||
} | ||
transform: translateX(-100%); | ||
} | ||
|
||
#sidebar-dimmer { | ||
show(); | ||
position: fixed; | ||
top: 0; | ||
left: 100%; | ||
width: 100%; | ||
height: 100%; | ||
background: #000; | ||
opacity: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters