hyva-tailwind-integration
БесплатноБез исполняемых скриптовНе проверенComprehensive guidance on integrating Tailwind CSS and JavaScript in Hyvä Themes, including configuration merging, module registration, and build processes…
Об этом скилле
Hyvä Theme Tailwind CSS & JS Integration Skill
Purpose
This skill provides comprehensive guidance on integrating Tailwind CSS and JavaScript in Hyvä Themes, including configuration merging, module registration, and build processes for Magento 2.
When to Use This Skill
- Setting up a new Hyvä theme with Tailwind CSS
- Creating Hyvä compatibility modules with custom styles
- Configuring Tailwind config merging across modules
- Understanding the Hyvä Tailwind build system
- Troubleshooting CSS compilation issues
- Implementing theme inheritance with proper Tailwind configuration
Overview of Hyvä Tailwind Architecture
Hyvä Themes uses a sophisticated Tailwind CSS build system that:
- Automatically merges Tailwind configurations from multiple modules
- Scans templates across theme, parent themes, and modules for CSS classes
- Supports CSS variables via the
twPropsutility for dynamic theming - Enables module-specific styling without theme modifications
Key Components
- @hyva-themes/hyva-modules - NPM package for config/CSS merging
- hyva-themes.json - Registry of modules with Tailwind configs
- tailwind.config.js - Theme-level Tailwind configuration
- tailwind-source.css - Source CSS with @tailwind directives
Directory Structure
app/design/frontend/Vendor/ThemeName/
├── web/
│ ├── css/
│ │ └── styles.css # Compiled output (git-ignored)
│ ├── js/
│ │ └── custom.js # Custom JavaScript
│ └── tailwind/
│ ├── package.json # NPM dependencies
│ ├── postcss.config.js # PostCSS configuration
│ ├── tailwind.config.js # Main Tailwind config
│ ├── tailwind-source.css # Source CSS
│ ├── tailwind.browser-jit.css # Browser JIT styles (optional)
│ ├── tailwind.browser-jit-config.js # Browser JIT config (optional)
│ └── components/ # Component-specific CSS
│ ├── typography.css
│ ├── button.css
│ ├── forms.css
│ └── ...
Setup Process
1. Install Hyvä Modules Package (Themes < 1.1.14)
Navigate to your theme's web/tailwind directory:
cd app/design/frontend/Vendor/ThemeName/web/tailwind
npm install @hyva-themes/hyva-modules
For Hyvä 1.1.14+: This package is included by default.
2. Configure tailwind.config.js
Update your theme's tailwind.config.js to use mergeTailwindConfig:
const { twProps, mergeTailwindConfig } = require('@hyva-themes/hyva-modules');
const colors = require('tailwindcss/colors');
/** @type {import('tailwindcss').Config} */
module.exports = mergeTailwindConfig({
content: [
// Current theme's phtml and layout XML files
'../../**/*.phtml',
'../../*/layout/*.xml',
'../../*/page_layout/override/base/*.xml',
// Parent theme (for child themes)
// '../../../../../../../vendor/hyva-themes/magento2-default-theme/**/*.phtml',
// '../../../../../../../vendor/hyva-themes/magento2-default-theme/*/layout/*.xml',
// app/code modules (if using custom modules)
// '../../../../../../../app/code/**/*.phtml',
],
theme: {
extend: {
fontFamily: {
sans: ['Segoe UI', 'Helvetica Neue', 'Arial', 'sans-serif']
},
colors: twProps({
primary: {
lighter: colors.blue['600'],
DEFAULT: colors.blue['700'],
darker: colors.blue['800']
},
secondary: {
lighter: colors.gray['100'],
DEFAULT: colors.gray['200'],
darker: colors.gray['300']
}
}),
backgroundColor: twProps({
container: {
lighter: '#ffffff',
DEFAULT: '#fafafa',
darker: '#f5f5f5'
}
}),
textColor: ({ theme }) => ({
...twProps({
primary: {
lighter: colors.gray['700'],
DEFAULT: colors.gray['800'],
darker: colors.gray['900']
}
}, 'text')
}),
minHeight: {
'a11y': '44px',
'screen-25': '25vh',
'screen-50': '50vh',
'screen-75': '75vh'
},
container: {
center: true,
padding: '1.5rem'
}
}
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography')
]
});
Key Features:
mergeTailwindConfig()- Wraps config to enable automatic module mergingtwProps()- Generates CSS variables for dynamic themingcontentarray - Specifies files to scan for Tailwind clas
Установить hyva-tailwind-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл hyva-tailwind-integration?
Comprehensive guidance on integrating Tailwind CSS and JavaScript in Hyvä Themes, including configuration merging, module registration, and build processes for Magento 2.
Как установить скилл hyva-tailwind-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hyva-tailwind-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic