forked from kitian616/jekyll-TeXt-theme
-
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.
feat: add modal mixin, sidebar mask now has transition effect just li…
…ke modal
- Loading branch information
Showing
3 changed files
with
29 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
.modal { | ||
@mixin modal($z-index: default, $color: default, $background-color: default) { | ||
@if $z-index == default { | ||
$z-index: map-get($z-indexes, modal); | ||
} | ||
@if $color == default { | ||
$color: $text-color-theme-dark; | ||
} | ||
@if $background-color == default { | ||
$background-color: $mask-color; | ||
} | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: map-get($z-index, modal); | ||
z-index: $z-index; | ||
width: 100%; | ||
height: 100%; | ||
color: $text-color-theme-dark; | ||
color: $color; | ||
touch-action: none; | ||
background-color: $mask-color; | ||
background-color: $background-color; | ||
opacity: 0; | ||
@include transform(translate(100%, 0)); | ||
@include transition(#{opacity map-get($animation, duration) map-get($animation, timing-function), | ||
transform 0s map-get($animation, duration) map-get($animation, timing-function)}); | ||
} | ||
|
||
.modal--overflow { | ||
@include overflow(auto); | ||
} | ||
|
||
.modal--show { | ||
@mixin modal--show() { | ||
opacity: 1; | ||
@include transform(translate(0, 0)); | ||
@include transition(#{opacity map-get($animation, duration) map-get($animation, timing-function)}); | ||
} | ||
|
||
.modal { | ||
@include modal(); | ||
} | ||
.modal--show { | ||
@include modal--show(); | ||
} | ||
.modal--overflow { | ||
@include overflow(auto); | ||
} |
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