-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add failing test for capturing shorthand with variable e.g. `animatio…
…n: var(--my-anim);`
- Loading branch information
1 parent
297104c
commit 2d21d1e
Showing
4 changed files
with
252 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Animation defined via variable</title> | ||
<style> | ||
:root { | ||
--duration-extra-long: 1.6s; | ||
--animation-fade-in: fadeIn var(--duration-extra-long) cubic-bezier(0, 0, .3, 1) forwards; | ||
} | ||
@keyframes fadeIn { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} | ||
#one { | ||
background-color: red; | ||
width: 200px; | ||
height: 200px; | ||
opacity: 0; | ||
} | ||
#one:not(.good) { | ||
animation: var(--animation-fade-in); | ||
animation-delay: 0.2s; | ||
} | ||
#one.ok { | ||
animation: var(--animation-fade-in); | ||
} | ||
</style> | ||
<link rel="stylesheet" type="text/css" href="assets/animation-var.css"> | ||
</head> | ||
<body> | ||
<div id="one"></div> | ||
</body> | ||
</html> |
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,4 @@ | ||
#one.cant-access-inner-text-here { /* like we could do .innerText for an inline <style> element */ | ||
animation: var(--animation-fade-in); | ||
animation-delay: 0.2s; | ||
} |
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