feat: add @container to recognized directives/@-rules#453
feat: add @container to recognized directives/@-rules#453
Conversation
The vendored preprocessor does not recognize @container, causing parse errors when UI5 libraries use CSS container queries for responsive component sizing. This commit adds @container to the directive switch alongside @supports and @Keyframes so it passes through correctly during preprocessing. CSS Container Queries are a W3C standard supported in all major browsers since 2023 see: https://caniuse.com/css-container-queries
|
@wridgeu Thanks a lot for your contribution. I highly appreciate your enhancement. The whole LESS and theming functionality for UI5 involves several teams at SAP and we have to ensure all involved parties are aligned. I will take this topic to the corresponding teams and will update the issue here as soon as I can share further news. |
|
@flovogt thank you very much! I also have a local patch applied to allow for But it's more than a simple addition to the case statement to support the various ways it can be written/used. I'm not adding a PR for that one though because I'm not sure what the plans are for supporting more up to date less versions (or updating the internally used one in general) in the future. Are there any insights you can give me regarding this? Or maybe there's a way to have the tooling pick up/use a more recent less version with some minor modifications? |
|
You're absolutely right. We are still using an old version of LESS. We have an eye on the overall LESS strategy and will discuss this topic over the next weeks. I will keep you up-to-date. |
The vendored preprocessor does not recognize
@container, causing parse errors when UI5 libraries use CSS container queries for responsive component sizing. This commit adds@containerto the directive switch alongside@supportsand@keyframesso it passes through correctly during preprocessing.CSS Container Queries are a W3C standard supported in all major browsers since 2023
see: https://caniuse.com/css-container-queries
A workaround currently, to still make use of the container queries, is using the inline import to import a secondary
.cssfile which then bypasses the less parser.@import (inline) ...ps: I wasn't sure if that counts as feature or simple chore ..