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.
Feature: Close sidebar when click any blank part (theme-next#607)
* Fix theme-next#606 * Add sidebar.dimmer option
- Loading branch information
1 parent
d2103a6
commit ebc0e3e
Showing
4 changed files
with
16 additions
and
18 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
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,21 +1,18 @@ | ||
.sidebar-active #sidebar-dimmer { | ||
opacity: .7; | ||
-webkit-transform: translateX(-150%); | ||
transform: translateX(-150%); | ||
transition: opacity .2s; | ||
.sidebar-active + #sidebar-dimmer { | ||
+mobile() { | ||
opacity: .7; | ||
transition: opacity .5s; | ||
} | ||
transform: translateX(-100%); | ||
} | ||
|
||
#sidebar-dimmer { | ||
display: none; | ||
position: absolute; | ||
display: block; | ||
position: fixed; | ||
top: 0; | ||
left: 100%; | ||
width: 200%; | ||
width: 100%; | ||
height: 100%; | ||
background: #000; | ||
opacity: 0; | ||
transition: opacity .2s,transform 0s .2s; | ||
+mobile() { | ||
display: block; | ||
} | ||
} |
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