feat: editor-styles

This commit is contained in:
2026-03-26 11:35:49 -04:00
parent 71edb3d676
commit 9cceda06de
8 changed files with 99 additions and 1 deletions

View File

@@ -1,7 +1,12 @@
@import "tailwindcss";
@import "tailwindcss" theme(static) source("../../..");
@import "@nuxt/ui";
@import "./containers.css";
@import "./links.css";
@import "./lists.css";
@import "./prose.css";
@import "./theme.css";
@import "./typography.css";
@import "./vendors/tinymce.css";
@import "./vendors/wordpress.css";

View File

@@ -0,0 +1,12 @@
/* List styles */
@utility list-horizontal {
@apply flex list-none flex-wrap items-center gap-3;
}
@utility list-ordered {
@apply list-decimal list-inside;
}
@utility list-unordered {
@apply list-disc list-inside;
}

View File

@@ -0,0 +1,35 @@
@utility prose {
/* Font size */
@apply text-lg;
/* Headings (allow class overrides) */
h1:not([class*="heading-"]) {
@apply heading-1;
}
h2:not([class*="heading-"]) {
@apply heading-2;
}
h3:not([class*="heading-"]) {
@apply heading-3;
}
h4:not([class*="heading-"]) {
@apply heading-4;
}
/* Links */
@apply links:link-underline;
/* Lists */
ol:not([class*="list-"]) {
@apply list-ordered;
}
ul:not([class*="list-"]) {
@apply list-unordered;
}
/* Spacing */
@apply space-y-3;
/* WordPress */
@apply wordpress;
}

View File

@@ -0,0 +1,3 @@
body#tinymce {
@apply prose;
}

View File

@@ -0,0 +1,39 @@
@utility wordpress {
/* Alignment */
.alignleft {
@apply float-left mr-6;
}
.alignright {
@apply float-right ml-6;
}
.aligncenter {
@apply mx-auto block;
}
/* Image */
img {
@apply h-auto max-w-full;
}
figure {
@apply max-w-full;
}
/* Caption */
.wp-caption {
@apply text-center;
}
.wp-caption-text,
figcaption {
@apply mt-3 text-sm text-muted;
}
/* Video */
.wp-video {
@apply w-full;
}
/* IFrame */
iframe {
@apply aspect-video w-full;
}
}