ワンクリックで
scss-unit-validator
Validates SCSS unit compatibility to prevent Sass compilation errors from mixing incompatible units like vw and rem
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Validates SCSS unit compatibility to prevent Sass compilation errors from mixing incompatible units like vw and rem
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Bidirectional design token translation between Style Dictionary JSON and _variables.scss for the Genesis Semantic Design System. Converts tokens to SCSS variables and parses existing SCSS back into structured token JSON.
Apply advanced glassmorphism, neon glows, quantum gradients, and consciousness animations using Genesis Ontological mixins. Implement futuristic visual effects while maintaining semantic purity. Use when enhancing visual aesthetics, creating immersive experiences, or implementing advanced UI effects from v2.0+ enhancements.
Migrate legacy CSS and SCSS to Genesis Ontological mixins. Convert raw CSS properties to semantic ontological patterns, ensure zero-CSS compliance in subdomain files, and maintain the three-tier architecture. Use when refactoring existing stylesheets to adopt the ontology system or auditing subdomain SCSS for semantic purity.
Manage bidirectional synchronization between _design/ JSON blueprints and Jekyll _includes/_layouts code. _design/ is the single source of truth for both Jekyll and Figma. Forward-syncs blueprints to _data/design/ for Jekyll. Reverse-extracts structural changes from HTML back to blueprints. Keeps genesis-core.scss selectors in step with layout-variants. Enriches blueprints with figmaStyles for Blueprint2Code import.
Author and validate JSON blueprints in _design/ that represent the skeletal structural intent of UI components and page layouts, entirely decoupled from visual styling or framework-specific code.
Create semantic HTML5 templates with accessibility-first principles for Genesis Ontological Design System. Ensure proper landmark elements, meaningful class names, WCAG compliance, and BEM-style naming. Includes ready-to-use component patterns for navigation, forms, cards, modals, and more. Use when building Jekyll templates, includes, or auditing HTML structure for semantic correctness.
| name | scss-unit-validator |
| description | Validates SCSS unit compatibility to prevent Sass compilation errors from mixing incompatible units like vw and rem |
| license | MIT |
| metadata | {"author":"ASISaga","version":"1.0","category":"testing","role":"validator"} |
| allowed-tools | Bash(validation:*) Read |
This skill validates that viewport units (vw, vh, vmin, vmax) and root-relative units (rem, em) are only mixed within CSS functions like calc() or clamp() where browsers can compute them at runtime. Prevents Sass compilation errors that occur when the preprocessor attempts to mathematically solve equations with incompatible units.
Sass/Jekyll builds fail when attempting to pre-compute mixed-unit arithmetic like 5vw + 1rem outside of CSS functions. Since Sass doesn't know the viewport width or root font size at compile time, it cannot resolve these calculations. This validator ensures all fluid design patterns use proper CSS runtime functions.
Location: .github/skills/scss-unit-validator/scripts/validate-units.sh
Usage:
# Standard validation (shows errors only)
npm run validate:scss:units
# Verbose mode (shows all valid patterns)
VERBOSE=1 npm run validate:scss:units
What it checks:
calc(5vw + 1rem), clamp(1rem, 2vw + 0.5rem, 2rem)5vw + 1rem, $spacing: 2vw - 0.5rem// CORRECT: Using calc() for mixed units
$font-h1: clamp(2.5rem, calc(5vw + 1rem), 4rem);
$font-body: clamp(1rem, calc(0.5vw + 0.75rem), 1.125rem);
h1 {
font-size: clamp(2rem, calc(4vw + 0.5rem), 3rem);
margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
// WRONG: Direct arithmetic without calc()
$font-size: 5vw + 1rem; // ❌ Sass compilation error
padding: 2vw - 0.5rem; // ❌ Incompatible units
// FIX: Wrap in calc()
$font-size: calc(5vw + 1rem); // ✅ Valid
padding: calc(2vw - 0.5rem); // ✅ Valid
NPM Script (add to package.json):
{
"scripts": {
"validate:scss:units": "./.github/skills/scss-unit-validator/scripts/validate-units.sh",
"test:scss:full": "npm run test:scss && npm run validate:scss:units"
}
}
CI/CD Integration (GitHub Actions):
- name: Validate SCSS Unit Compatibility
run: npm run validate:scss:units
npm run validate:scss:units0: All unit mixing is valid (passes CI)1: Found incompatible unit errors (fails CI)→ Fluid Design Patterns: /docs/specifications/responsive-design.md
→ SCSS Instructions: .github/instructions/scss.instructions.md
→ Ontology System: /docs/specifications/scss-ontology-system.md
→ CSS Functions: https://developer.mozilla.org/en-US/docs/Web/CSS/calc
Version: 1.0
Last Updated: 2026-02-14