arielsalminen/elena/elena-styles
Claude Code and agent skill by arielsalminen/elena
- community
Checking that the SKILL.md file is still in the repository.
Critical CSS rules for Elena components. @scope encapsulation, all:unset reset for Primitives only, SSR hydration pattern, theming, and browser bug workarounds.
Install
npx vskill@latest install arielsalminen/elena/elena-stylesSKILL.md
Elena Styles — Critical Rules
Full reference: https://elenajs.com/llms-full.txtPage index: https://elenajs.com/llms.txt
@scope
Use @scope (tag-name) to prevent component styles from leaking out to the page. As an alternative, you can use CSS cascade layers (@layer) to control style precedence instead of all: unset.
Encapsulation reset
Primitive Components: include the reset. Composite Components: do NOT.
The reset prevents global styles from leaking into the component:
- The
:where(:not(img, svg):not(svg *))exclusion is required — do not simplify to*. It preserves image and SVG rendering. display: revertrestores browser default display values afterall: unsetremoves them.- Composite Components intentionally let global styles flow in — no reset.
SSR hydration pattern
Style both the host before hydration AND the rendered inner element with the same baseline styles to avoid layout shift:
The :scope:not([hydrated]) rule applies before JavaScript runs; the inner element selector applies after Elena renders and adds the [hydrated] attribute. This pattern only applies to Primitive Components (those with render()).
Pre-hydration pseudo-elements
Use CSS pseudo-elements with attr() to surface additional content before hydration:
Theming
Define CSS custom properties on :scope as the public theming API:
Annotate with @cssprop [--prop-name] - description JSDoc on the class for CEM documentation.
Variant and state styling
Use attribute selectors on :scope — not descendant selectors:
Styles without @scope
For older browsers that don’t support @scope, use namespaced selectors and the :is() pattern instead:
Composite Component CSS
Composite Components do NOT include the encapsulation reset. Style the host element and provide attribute-based customization:
Browser bugs
Firefox 148: @scope combined with attr[value] selectors can be buggy. Fixed in Firefox 149+. For broader Firefox support, use namespaced selectors instead of @scope.
Safari 26.3: @scope rules do not apply to <input> and <textarea>. Fixed in Safari 26.4 and newer. Workaround for older versions: style form controls outside @scope using namespaced selectors, e.g. elena-input input { ... }.
Shadow DOM
Opt in with static shadow = "open" and static styles. Elena renders into the shadow root. @scope is not needed inside Shadow DOM. CSS custom properties still pierce the shadow boundary for theming.
Warning: Without Declarative Shadow DOM, Shadow DOM breaks progressive enhancement: nothing is visible until JavaScript runs. See Declarative Shadow DOM (<template shadowrootmode="open">) for a standards-based alternative.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/public/.well-known/skills/elena-styles/SKILL.md
Popularity
- Repository stars
- 207
- Repository forks
- 6
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/arielsalminen/elena/elena-styles)