Conversation
`WikimediaLessCompiler` wraps `Less_Parser` with a clean `compile()` API and normalizes parser exceptions into `RuntimeException`. `PreEvalVisitor` establishes a base for visitors that hook into the pre-`compile()` phase, receiving the raw AST before variables and mixins are resolved. `CssVarVisitor` replaces every Less color variable reference with a `var(--name, fallback)` call, enabling runtime theming through CSS custom properties while preserving Less fallback resolution. `DetachedRulesetCallVisitor` expands a named detached ruleset into a configured Less template, making it possible to wrap styles in constructs like `@media` blocks without modifying the Less source. The `wikimedia/less.php` dependency is bumped from `^3.2.1` to `^5.5` to align with the `isPreEvalVisitor` hook and other APIs these visitors rely on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WikimediaLessCompilerwrapsLess_Parserwith a cleancompile()API and normalizes parser exceptions intoRuntimeException.PreEvalVisitorestablishes a base for visitors that hook into the pre-compile()phase, receiving the raw AST before variables and mixins are resolved.CssVarVisitorreplaces every Less color variable reference with avar(--name, fallback)call, enabling runtime theming through CSS custom properties while preserving Less fallback resolution.DetachedRulesetCallVisitorexpands a named detached ruleset into a configured Less template, making it possible to wrap styles in constructs like@mediablocks without modifying the Less source.The
wikimedia/less.phpdependency is bumped from^3.2.1to^5.5to align with theisPreEvalVisitorhook and other APIs these visitors rely on.refs Icinga/icingaweb2#5492
refs Icinga/icinga-php-thirdparty#115