Skip to content

Commit

Permalink
Scroll 'Coy' background with contents (#1163)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
nickersonm authored and Golmote committed Sep 9, 2017
1 parent 11eed25 commit 310990b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions themes/prism-coy.css
Original file line number Diff line number Diff line change
Expand Up @@ -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"] {
Expand Down

0 comments on commit 310990b

Please sign in to comment.