Commit 310990b23708b76f01dd8ace39ce041c5492996b

nickersonm 2017-09-09T06:43:25

Scroll 'Coy' background with contents (#1163) * Scroll 'Coy' background with contents Attaches <pre> background (alternating line colors in 'Coy') to <code> contents when in limited-height <pre> that requires scrolling. * Moves background to <code> element Move background from <pre> element to <code> element to preserve <pre> drop-shadows while keeping background attached during scroll.

diff --git a/themes/prism-coy.css b/themes/prism-coy.css
index 1e6cff7..9b21b09 100644
--- a/themes/prism-coy.css
+++ b/themes/prism-coy.css
@@ -30,14 +30,18 @@ pre[class*="language-"] {
 pre[class*="language-"] {
 	position: relative;
 	margin: .5em 0;
-	box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
+	overflow: visible;
+	padding: 0;
+}
+pre[class*="language-"]>code {
+	position: relative;
 	border-left: 10px solid #358ccb;
+	box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
 	background-color: #fdfdfd;
 	background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
 	background-size: 3em 3em;
 	background-origin: content-box;
-	overflow: visible;
-	padding: 0;
+	background-attachment: local;
 }
 
 code[class*="language"] {