-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a5be95
commit 9c44efc
Showing
5 changed files
with
68 additions
and
2 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
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
61 changes: 61 additions & 0 deletions
61
lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.sheet { | ||
background-color: var(--color-bg); | ||
border-inline-start-width: var(--border); | ||
box-shadow: var(--shadow-lg); | ||
block-size: 100%; | ||
color: var(--color-text); | ||
inline-size: var(--size-3-4); | ||
margin-inline-start: auto; | ||
max-block-size: none; | ||
max-inline-size: var(--width-sm); | ||
padding: var(--size-6); | ||
|
||
&::backdrop { | ||
background-color: rgba(0, 0, 0, .8); | ||
} | ||
|
||
/* Setup animation */ | ||
transform: translateX(100%); | ||
transition-behavior: allow-discrete; | ||
transition-duration: var(--time-500); | ||
transition-property: display, overlay, transform; | ||
|
||
&::backdrop { | ||
opacity: 0; | ||
transition-behavior: allow-discrete; | ||
transition-duration: var(--time-150); | ||
transition-property: display, overlay, opacity; | ||
} | ||
|
||
/* In animation */ | ||
&[open] { | ||
transform: translateX(0); | ||
} | ||
|
||
&[open]::backdrop { | ||
opacity: 1; | ||
} | ||
|
||
/* Out animation */ | ||
@starting-style { | ||
&[open] { | ||
transform: translateX(100%); | ||
} | ||
|
||
&[open]::backdrop { | ||
opacity: 0; | ||
} | ||
} | ||
|
||
/* Small screens and below */ | ||
@media (width < 40rem) { | ||
max-inline-size: none; | ||
text-align: center; | ||
} | ||
} | ||
|
||
.sheet__close { | ||
inset-block-start: var(--size-4); | ||
inset-inline-end: var(--size-4); | ||
position: absolute; | ||
} |