feat: collapseNesting native/compact enum in the options panel - #37
Conversation
collapseNesting became an enum in Less 5.0.0-alpha (false | 'native' | 'compact'), so expose it as a select instead of a boolean switch: - false: keep authored nesting (default) - native: CSS Nesting desugaring — parent :is(), child list distributed (specificity-faithful, matches the browser and Less 4.x) - compact: also folds same-combinator descendant runs into one :is() Select values are strings, so renderOptions normalizes 'false'/'true' back to booleans before they reach less.render (harmless for the other selects). Still gated to v5 (min 5.0.0); 4.x is unaffected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The option update has a consistent UI and version-gated rendering path, with no established merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
collapseNestingbecame an enum in Less5.0.0-alpha—false|'native'|'compact'(trueis a deprecated alias for'native'). This surfaces it in the options panel as a select instead of a boolean switch.:is(), child selector lists distributed, so each branch keeps its own specificity (matches the browser and Less 4.x).:is().Only
src/options.tschanges — the option table drives the UI, so App.vue/Select.vue are untouched. Select values are strings, sorenderOptionsnormalizes'false'/'true'back to booleans before they reachless.render(harmless for the other selects; no math/unitMode value is'true'/'false'). Still gated to v5 (min: '5.0.0'); 4.x is unaffected.Note: rendering
nativevscompactdistinctly needs the Less wrapper's enum passthrough (less/less.js#4533 →5.0.0-alpha.7); onalpha.6the option coerces to a boolean. The playground loads the latestalphadist-tag, so it lights up automatically once alpha.7 publishes.