For custom attachments we don't manage figures anymore, but action-text-attachments

So that we keep HTML valid when nesting them within paragraphs
This commit is contained in:
Jorge Manrubia
2025-07-02 16:01:34 +02:00
parent 22283851ee
commit 18afaa87c2
4 changed files with 10 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/basecamp/actiontext-lexical
revision: f36a20252aeaaa287d768d70d8a5f48a6e8e0ca7
revision: d18725773b8a654ef577061bbdf8c0ab35e07073
branch: remove-diacritics
specs:
actiontext-lexical (0.1.0)
@@ -4,7 +4,7 @@
position: relative;
overflow: visible;
.node--selected:not(.attachment--custom) {
figure.node--selected {
&:not(:has(img)) {
box-shadow: 0 0 0 var(--hover-size) var(--hover-color);
}
+7 -10
View File
@@ -20,7 +20,7 @@
:where(h5) { font-size: 0.83em; }
:where(h6) { font-size: 0.67em; }
:where(p, ul, ol, dl, blockquote, figure:not(.attachment--custom), .attachment:not(.attachment--custom)) {
:where(p, ul, ol, dl, blockquote, figure, .attachment) {
margin-block: var(--block-margin);
overflow-wrap: break-word;
text-wrap: pretty;
@@ -158,7 +158,7 @@
/* Attachments
/* ------------------------------------------------------------------------ */
.attachment:not(.attachment--custom) {
.attachment {
block-size: auto;
display: inline-block;
inline-size: 100%;
@@ -325,19 +325,16 @@
}
/* Custom attachments such as mentions, etc. */
.attachment--custom {
display: inline;
padding: 0;
margin: 0;
white-space: normal;
}
.attachment--custom,
action-text-attachment[content-type^='application/vnd.actiontext'] {
--attachment-bg-color: transparent;
--attachment-image-size: 1em;
--attachment-text-color: var(--color-ink);
display: inline;
padding: 0;
margin: 0;
white-space: normal;
align-items: center;
color: var(--attachment-text-color);
display: inline-flex;
+1 -1
View File
@@ -209,7 +209,7 @@
/* ------------------------------------------------------------------------ */
.terminal {
.attachment--custom:not(.node--selected) {
action-text-attachment:not(.node--selected) {
--attachment-bg-color: oklch(var(--lch-white) / 15%);
--attachment-text-color: var(--color-terminal-text);
}