@marvalt/wparser 0.1.50 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -2329,14 +2329,16 @@ const Heading = ({ block, children, context }) => {
|
|
|
2329
2329
|
const textAlign = getTextAlignClasses(attrs['textAlign']);
|
|
2330
2330
|
const fontSize = getFontSizeClasses(attrs['fontSize']);
|
|
2331
2331
|
const Tag = `h${Math.min(Math.max(Number(level) || 2, 1), 6)}`;
|
|
2332
|
-
//
|
|
2333
|
-
|
|
2332
|
+
// Use CSS variables for font sizes (defined in index.css) instead of Tailwind classes
|
|
2333
|
+
// Only use Tailwind class if explicitly set via fontSize attribute
|
|
2334
|
+
const sizeClass = fontSize || ''; // Let CSS variables handle default sizes
|
|
2334
2335
|
// Get spacing from config with improved defaults
|
|
2335
2336
|
const spacingClass = getHeadingSpacing(context.spacingConfig || context.registry.spacingConfig, level);
|
|
2336
|
-
// Extract text color if specified, otherwise inherit from parent
|
|
2337
|
+
// Extract text color if specified, otherwise inherit from parent (CSS variables handle default)
|
|
2337
2338
|
const textColor = extractTextColor(block, context);
|
|
2338
|
-
const textColorClass = textColor || ''; // Don't hardcode - let
|
|
2339
|
-
|
|
2339
|
+
const textColorClass = textColor || ''; // Don't hardcode - let CSS variables handle default
|
|
2340
|
+
// Don't hardcode font-bold - let CSS variables handle font weight from WordPress
|
|
2341
|
+
return (jsxRuntimeExports.jsx(Tag, { className: buildClassName(textColorClass, sizeClass, textAlign, spacingClass), children: children ?? content }));
|
|
2340
2342
|
};
|
|
2341
2343
|
const Image = ({ block, context }) => {
|
|
2342
2344
|
const imageAttrs = getImageAttributes(block);
|