XF 1.5 Quirk with templates rewriting property & CSS syntax

Nulumia

Well-known member
Licensed customer
I'm wrestling with this weird quirk going on with calling Style Properties, wondering if anyone with inside knowledge of XF could offer some insight..

1. Let's say I have a custom property, @extraContent. I want to match most of the padding values of @primaryContent, so in each of the property fields of @extraContent, I enter:
Padding Top: @primaryContent.padding-all
Padding Right: @primaryContent.padding-all
Padding Bottom: 14px;
Padding Left: @primaryContent.padding-all

Style Properties  Attachments   Admin CP - Nulumia Dev Forum.webp
This works just fine, as long as the field I'm calling (@primaryContent.padding-all) has something written in it, in this case, 10px.

I then hook the div class and property together by doing this:
Code:
.extraContent {
{xen:property "extraContent"}
}

If I refresh the template, the above hook gets reprinted like this:
Code:
.extraContent {
@property "extraContent";
padding: @primaryContent.padding-all @primaryContent.padding-all 14px;
@property "/extraContent";
}

This still works. However, the next time the template is saved, it will actually update back on the Style Property page and mess it up:
Style Properties  Attachments   Admin CP - Nulumia Dev Forum (1).webp

Basically it moves the entries out of the fields and prints it on a single line. My best guess is that when it condenses into shorthand (top, left/right, bottom) as margin & padding usually does, this messes up maintaining the fields. But yet, there's plenty of properties that have condense-able entries, like 4px/8px/4px/8px, and they stay intact.

The biggest problem is if I hook other properties to these values, as soon as one goes down, all the others go down as well like.

Much thanks for any ideas or insight,
 
Back
Top Bottom