-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef3aa0e
commit 037b351
Showing
6 changed files
with
391 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,7 @@ export const Default: Story = { | |
}, | ||
createdAt: subMonths(new Date(), 1), | ||
title: "Title", | ||
description: | ||
"Description with a maximum of two lines visible.<br />Like this one :)<br />This shouldn't be visible", | ||
description: `<p class="TextEditorTheme__paragraph" dir="ltr"><span>Super Kudos for </span><strong class="mentioned"><span><a href="/employees/1">First Employee</a></span></strong><span> and </span><strong class="mentioned"><span><a href="/employees/2">Second Employee</a></span></strong><span> , who always are available to help in any way they can and as quickly as possible. You guys are great! ⭐</span></p><p class="TextEditorTheme__paragraph" dir="ltr">Including some link here too: <a href="mailto:[email protected]" class="TextEditorTheme__link"><span>[email protected]</span></a></p></p>`, | ||
onClick: () => {}, | ||
imageUrl: | ||
"https://multimedia.andalucia.org/media/0BC700DB844F4EDFBE00C1FA9B493D71/img/1112772E6D5945A1B89C26E539DD0D99/SE_Catedral_01.jpg?responsive", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
220 changes: 220 additions & 0 deletions
220
lib/experimental/Information/Communities/Post/PostDescription/TextEditorTheme.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
.TextEditor { | ||
@apply leading-6; | ||
} | ||
|
||
.TextEditorTheme__ltr { | ||
@apply text-left; | ||
} | ||
|
||
.TextEditorTheme__rtl { | ||
@apply text-right; | ||
} | ||
|
||
.TextEditorTheme__paragraph { | ||
@apply relative m-0 mb-2; | ||
} | ||
|
||
.TextEditorTheme__paragraph:last-child { | ||
@apply mb-0; | ||
} | ||
|
||
.TextEditorTheme__quote { | ||
@apply m-0 mb-2.5 ml-5 border-b-4 pl-4; | ||
color: rgb(101, 103, 107); | ||
border-left-color: rgb(206, 208, 212); | ||
} | ||
|
||
.TextEditorTheme__h1 { | ||
@apply m-0 mb-3 p-0 text-xl font-semibold; | ||
} | ||
|
||
.TextEditorTheme__h2 { | ||
@apply m-0 mt-2.5 p-0 text-lg; | ||
} | ||
|
||
.TextEditorTheme__h3 { | ||
@apply m-0 mt-2.5 p-0; | ||
} | ||
|
||
.TextEditorTheme__textBold { | ||
@apply font-semibold; | ||
} | ||
|
||
.TextEditorTheme__textItalic { | ||
@apply italic; | ||
} | ||
|
||
.TextEditorTheme__textUnderline { | ||
@apply underline; | ||
} | ||
|
||
.TextEditorTheme__textStrikethrough { | ||
@apply line-through; | ||
} | ||
|
||
.TextEditorTheme__textUnderlineStrikethrough { | ||
text-decoration: underline line-through; | ||
} | ||
|
||
.TextEditorTheme__textSubscript { | ||
vertical-align: sub !important; | ||
} | ||
|
||
.TextEditorTheme__textSuperscript { | ||
vertical-align: super; | ||
} | ||
|
||
.TextEditorTheme__textCode { | ||
background-color: rgb(240, 242, 245); | ||
padding: 1px 0.25rem; | ||
font-family: Menlo, Consolas, Monaco, monospace; | ||
} | ||
|
||
.TextEditorTheme__hashtag { | ||
@apply rounded-xs bg-f1-background-info px-0.5 py-0.5 font-medium text-f1-foreground-info no-underline; | ||
} | ||
|
||
.TextEditorTheme__link { | ||
@apply font-medium text-f1-link; | ||
} | ||
|
||
.TextEditorTheme__link:hover { | ||
@apply underline; | ||
} | ||
|
||
.TextEditorTheme__code { | ||
@apply mx-0 my-2 p-2 pl-10; | ||
background-color: rgb(240, 242, 245); | ||
font-family: Menlo, Consolas, Monaco, monospace; | ||
display: block; | ||
line-height: 1.53; | ||
tab-size: 2; | ||
/* white-space: pre; */ | ||
overflow-x: auto; | ||
position: relative; | ||
} | ||
|
||
.TextEditorTheme__code:before { | ||
content: attr(data-gutter); | ||
position: absolute; | ||
background-color: #eee; | ||
left: 0; | ||
top: 0; | ||
border-right: 1px solid #ccc; | ||
padding: 8px; | ||
color: #777; | ||
white-space: pre-wrap; | ||
text-align: right; | ||
min-width: 25px; | ||
} | ||
|
||
.TextEditorTheme__code:after { | ||
content: attr(data-highlight-language); | ||
top: 0; | ||
right: 3px; | ||
padding: 3px; | ||
text-transform: uppercase; | ||
position: absolute; | ||
color: rgba(0, 0, 0, 0.5); | ||
} | ||
|
||
.TextEditorTheme__characterLimit { | ||
display: inline; | ||
background-color: #ffbbbb !important; | ||
} | ||
|
||
.TextEditorTheme__ol1 { | ||
@apply m-0 ml-4 p-0; | ||
} | ||
|
||
.TextEditorTheme__ol2 { | ||
@apply m-0 ml-4 p-0; | ||
list-style-type: upper-alpha; | ||
} | ||
|
||
.TextEditorTheme__ol3 { | ||
@apply m-0 ml-4 p-0; | ||
list-style-type: lower-alpha; | ||
} | ||
|
||
.TextEditorTheme__ol4 { | ||
@apply m-0 ml-4 p-0; | ||
list-style-type: upper-roman; | ||
} | ||
|
||
.TextEditorTheme__ol5 { | ||
@apply m-0 ml-4 p-0; | ||
list-style-type: lower-roman; | ||
} | ||
|
||
.TextEditorTheme__ul { | ||
@apply m-0 ml-4 p-0; | ||
list-style: disc; | ||
} | ||
|
||
.TextEditorTheme__tokenComment { | ||
color: slategray; | ||
} | ||
|
||
.TextEditorTheme__tokenPunctuation { | ||
color: #999; | ||
} | ||
|
||
.TextEditorTheme__tokenProperty { | ||
color: #905; | ||
} | ||
|
||
.TextEditorTheme__tokenSelector { | ||
color: #690; | ||
} | ||
|
||
.TextEditorTheme__tokenOperator { | ||
color: #9a6e3a; | ||
} | ||
|
||
.TextEditorTheme__tokenAttr { | ||
color: #07a; | ||
} | ||
|
||
.TextEditorTheme__tokenVariable { | ||
color: #e90; | ||
} | ||
|
||
.TextEditorTheme__tokenFunction { | ||
color: #dd4a68; | ||
} | ||
|
||
.TextEditorTheme__mark { | ||
background: rgba(255, 212, 0, 0.14); | ||
border-bottom: 2px solid rgba(255, 212, 0, 0.3); | ||
padding-bottom: 2px; | ||
} | ||
|
||
.TextEditorTheme__markOverlap { | ||
background: rgba(255, 212, 0, 0.3); | ||
border-bottom: 2px solid rgba(255, 212, 0, 0.7); | ||
} | ||
|
||
.TextEditorTheme__mark.selected { | ||
background: rgba(255, 212, 0, 0.5); | ||
border-bottom: 2px solid rgba(255, 212, 0, 1); | ||
} | ||
|
||
.TextEditorTheme__markOverlap.selected { | ||
background: rgba(255, 212, 0, 0.7); | ||
border-bottom: 2px solid rgba(255, 212, 0, 0.7); | ||
} | ||
|
||
.mention a, | ||
.mentioned a { | ||
@apply rounded-xs bg-f1-background-accent px-1.5 py-0.5 font-medium text-f1-foreground-accent no-underline; | ||
} | ||
|
||
.mention:focus a, | ||
.mentioned:focus a { | ||
@apply outline outline-1 outline-offset-1 outline-f1-border-selected-bold; | ||
} | ||
|
||
.link_mentioned { | ||
text-decoration: none; | ||
} |
Oops, something went wrong.