Skip to content

fix(build): prevent styles leak to v8#8091

Merged
ShGKme merged 1 commit intomainfrom
fix/css-module-collision
Jan 19, 2026
Merged

fix(build): prevent styles leak to v8#8091
ShGKme merged 1 commit intomainfrom
fix/css-module-collision

Conversation

@ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 17, 2026

☑️ Resolves

  • We have styles encapsulation
  • It uses content hash for encapsulation, so the same component code results in the same styles scope
  • However, Vue 2 and Vue 3 components may have exactly the same code, which results in the same styles scope
  • While runtime is different, for example, with v-bind in css feature
  • It may result in Vue 2 component breaking the same Vue 3 component styles
image
  • Example: NcIconToggleSwitch component. Tables app (Vue 2) breaks styles for Talk (Vue 3)
Screenshot 2026-01-16 141158
  • Fix: add hash prefix to make it different from v8

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme added this to the 9.4.0 milestone Jan 17, 2026
@ShGKme ShGKme requested review from Antreesy and susnux January 17, 2026 00:18
@ShGKme ShGKme self-assigned this Jan 17, 2026
@ShGKme ShGKme added bug Something isn't working 3. to review Waiting for reviews labels Jan 17, 2026
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 17, 2026

/backport! to stable8

1 similar comment
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 17, 2026

/backport! to stable8

@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.77%. Comparing base (1b98e06) to head (c83af2d).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8091   +/-   ##
=======================================
  Coverage   52.77%   52.77%           
=======================================
  Files         103      103           
  Lines        3348     3348           
  Branches      976      977    +1     
=======================================
  Hits         1767     1767           
  Misses       1333     1333           
  Partials      248      248           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ShGKme ShGKme merged commit 9a53f3d into main Jan 19, 2026
27 checks passed
@ShGKme ShGKme deleted the fix/css-module-collision branch January 19, 2026 09:49
@Antreesy Antreesy mentioned this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants