Coy theme shadow doesn't correctly wrap around floats.
See original GitHub issueYears ago I had turned off the Coy theme shadow as we discussed in #894, but I had forgotten exactly why. (I had thought it only had to do with scrollbars in generated PDFs in #859.) So when I updated to the latest Prism a few days ago and published my entire software development course, I left the Coy theme shadow on.
Now I see that the Coy theme shadow is broken when wrapping around flows. Here are a couple of examples:
- https://www.globalmentor.com/courses/softdev/unit-tests (Look for the figure with the caption “Testing
Math.abs(int)
.”) - https://www.globalmentor.com/courses/softdev/surf (Look in the section “URF, SURF, and TURF”.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
CSS Float not wrapping around - Stack Overflow
Not if it is a block . What is happening is floats are collapsing on top of block elements.
Read more >Prism
Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. It's used in millions of websites, including some of...
Read more >CREAK Data Explorer - UT Computer Science
The National Hockey League promotes modern poetry and rap music. ... The Prime Minister of the United Kingdom does not preside over England...
Read more >prismjs | Yarn - Package Manager
Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from Dabblet. You can learn more on prismjs.com. Why...
Read more >Urvanov Syntax Highlighter – WordPress plugin
Reincarnation of Crayon Syntax Highlighter. Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, or post text.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I really think you need to document the differences among the themes, the bugs each have, and the workarounds, though. It’s not good to have people happily download what according to the site is a wonderful, beautiful, perfect thing; and then halfway through a project find out it breaks their layout because they weren’t informed.
It seems like Coy is the only theme that exhibits this behavior. All other themes work as intended in that the pre doesn’t overlap with other elements.
The cause is that the
overflow
of thepre
is set tovisible
. Any otheroverflow
value will fix the bug and will make Coy behave like all other themes but it also breaks Coy’s design completely.So I tried to rewrite the Coy theme to not use
overflow: visible
on thepre
but couldn’t do it. My problem was isoverflow: visible
is the only overflow value that allows you to draw outside thepre
. Without it, the shadows aren’t possible, at least for me.I’ll make a PR with my first fix (
clear: both
). By far not perfect but I hope it’ll solve your problem.