Summary Files Commits Branches @commit @diff @stats
path: root / docs / css / spectre-exp.css
diff options
context:
space:
mode:
Commit74e7420bc3727229cdffbc686a43b955b4d3d5d9 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-04-01 16:36:40 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-04-01 16:36:40 +0800
Filesd04b5771e438e7e5614fefd7040e1dd93f9e4e75 /docs/css/spectre-exp.css
Spectre-Dark-Gruvbox-74e7420bc3727229cdffbc686a43b955b4d3d5d9.tar
Spectre-Dark-Gruvbox-74e7420bc3727229cdffbc686a43b955b4d3d5d9.tar.gz
Spectre-Dark-Gruvbox-74e7420bc3727229cdffbc686a43b955b4d3d5d9.zip
Parent78e146ff17306ab3810fbf5902cc4c0c66fdaf9e (diff)
Add Comparison Sliders
1 files changed, 113 insertions, 2 deletions
-rw-r--r--docs/css/spectre-exp.css115
diff --git a/docs/css/spectre-exp.css b/docs/css/spectre-exp.css
index 34fff52..1a9af74 100644
--- a/docs/css/spectre-exp.css
+++ b/docs/css/spectre-exp.css
@@ -242,8 +242,8 @@
.carousel .carousel-locator:nth-of-type(2):checked ~ .carousel-container .carousel-item:nth-of-type(2),
.carousel .carousel-locator:nth-of-type(3):checked ~ .carousel-container .carousel-item:nth-of-type(3),
.carousel .carousel-locator:nth-of-type(4):checked ~ .carousel-container .carousel-item:nth-of-type(4) {
- -webkit-animation: carousel-slidein .75s ease-in 1;
- animation: carousel-slidein .75s ease-in 1;
+ -webkit-animation: carousel-slidein .75s ease-in-out 1;
+ animation: carousel-slidein .75s ease-in-out 1;
opacity: 1;
z-index: 100;
}
@@ -333,6 +333,117 @@
transform: translateX(-50%);
}
}
+.comparison-slider {
+ height: 50vh;
+ overflow: hidden;
+ position: relative;
+ width: 100%;
+}
+.comparison-slider .comparison-before,
+.comparison-slider .comparison-after {
+ height: 100%;
+ left: 0;
+ margin: 0;
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+}
+.comparison-slider .comparison-before img,
+.comparison-slider .comparison-after img {
+ height: 100%;
+ object-fit: none;
+ object-position: left top;
+ position: absolute;
+ width: 100%;
+ z-index: -1;
+}
+.comparison-slider .comparison-before {
+ width: 100%;
+}
+.comparison-slider .comparison-after {
+ max-width: 100%;
+ min-width: 0;
+}
+.comparison-slider .comparison-after::before {
+ background: rgba(69, 77, 93, .35);
+ border-radius: .2rem;
+ color: #fff;
+ content: "";
+ height: 100%;
+ position: absolute;
+ right: 0;
+ top: 0;
+ width: 1rem;
+}
+.comparison-slider .comparison-after::after {
+ background: currentColor;
+ border-radius: 50%;
+ box-shadow: 0 -.6rem, 0 .6rem;
+ color: #fff;
+ content: "";
+ height: .4rem;
+ position: absolute;
+ right: .5rem;
+ top: 50%;
+ -webkit-transform: translate(50%, -50%);
+ -ms-transform: translate(50%, -50%);
+ transform: translate(50%, -50%);
+ width: .4rem;
+ z-index: -1;
+}
+.comparison-slider .comparison-resizer {
+ -webkit-animation: first-run 1.5s 1 ease-in-out;
+ animation: first-run 1.5s 1 ease-in-out;
+ cursor: ew-resize;
+ height: 1.5rem;
+ left: 0;
+ margin: 0;
+ max-width: 100%;
+ min-width: 1rem;
+ opacity: 0;
+ outline: 0;
+ position: relative;
+ resize: horizontal;
+ top: 50%;
+ -webkit-transform: translateY(-50%) scaleY(30);
+ -ms-transform: translateY(-50%) scaleY(30);
+ transform: translateY(-50%) scaleY(30);
+ width: 0;
+}
+@-webkit-keyframes first-run {
+ 0% {
+ width: 0;
+ }
+ 25% {
+ width: 4rem;
+ }
+ 50% {
+ width: 1rem;
+ }
+ 75% {
+ width: 2rem;
+ }
+ 100% {
+ width: 0;
+ }
+}
+@keyframes first-run {
+ 0% {
+ width: 0;
+ }
+ 25% {
+ width: 4rem;
+ }
+ 50% {
+ width: 1rem;
+ }
+ 75% {
+ width: 2rem;
+ }
+ 100% {
+ width: 0;
+ }
+}
.meter {
-webkit-appearance: none;
-moz-appearance: none;