Skip to content

Conversation

@niatalwalkar
Copy link

Description

This PR fixes a UI bug by preserving and displaying the complete CSS variable (without truncating the second parameter) in both the input field and the dropdown suggestion list under Display.
Closes #5378

Steps for reproduction

Before this fix (current behavior):

  1. Open an existing project or create a new one.
  2. Select an element and navigate to Style → Advanced → + → Add new CSS Property and choose display.
  3. Set display to: var(--anchor-display, none).
  4. The displayed value is truncated and the none appears to be missing under the Advanced section, even though it’s saved internally.

After this fix (expected behavior):

  1. Follow the same steps as above.
  2. The advanced property and the Display dropdown both consistently show var(--anchor-display, none) without truncation.

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file
@niatalwalkar niatalwalkar changed the title Fix CSS var() truncation in advanced styles panel (#5378) fix: CSS var() truncation in advanced styles panel (#5378) Nov 30, 2025
@niatalwalkar
Copy link
Author

Hi! It looks like the CI failed because GitHub doesn’t allow workflows from forked PRs to post comments. This seems unrelated to my code changes. Please let me know if I need to do anything on my side!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant