fix click to reveal text initial render

This commit is contained in:
keyan 2023-12-04 18:02:48 -06:00
parent 2298f1455f
commit e8e22ad7d4
2 changed files with 4 additions and 3 deletions

View File

@ -113,7 +113,7 @@ export default memo(function Text ({ nofollow, imgproxyUrls, children, tab, ...o
}, [imgproxyUrls, outerProps, tab]) }, [imgproxyUrls, outerProps, tab])
return ( return (
<div className={`${styles.text} ${overflowing && !show ? styles.textContained : ''}`} ref={containerRef}> <div className={`${styles.text} ${show ? styles.textUncontained : overflowing ? styles.textContained : ''}`} ref={containerRef}>
<ReactMarkdown <ReactMarkdown
components={{ components={{
h1: Heading, h1: Heading,

View File

@ -5,10 +5,11 @@
line-height: 140%; line-height: 140%;
overflow-y: hidden; overflow-y: hidden;
position: relative; position: relative;
max-height: 200vh;
} }
.textContained { .textUncontained {
max-height: 200vh; max-height: none;
} }
.textContained::before { .textContained::before {