Open Tankonyako opened 1 month ago
Did you take a look at some of the errors within the console? I believe you are using some unsupported style properties
rem or any relative measurements have never worked for me, unless it has been fixed recently #5411
Did you take a look at some of the errors within the console? I believe you are using some unsupported style properties
no i didnt receive any errors (only if i do calc(400px), if i put math errors gone and math didnt work only getting first value: example: calc(100px * 4) it gives 100px, not 400px) you can see this at video i using margin for demonstration calculation
I just tested more, on client rem while connected also broken (hot reload help), also i found one, if i set all raw values to 1px for example (with code), it will change styles in game, but if i comment this code and restart scene, changes also persist, i think is s&box style cache algo (StyleSheet.Loaded is singletone , get styles only once and reload while file changes. maybe some broken in this part and losing information when game getting cached styles. i think file change fixing some variables and rem start work (freshing variables)
foreach (var item in Panel.Children)
{
foreach (var style in item.AllStyleSheets)
{
foreach (var n in style.Nodes)
{
foreach(var i in n.GetRawValues())
{
n.SetRawValue(i.Name,"1px"); // some styles will keep, on next run also if comment (in editor, game not saving)
}
}
}
}
Everything seems to be fine?
Describe the bug
Hello i found two bugs but i think it can be merged in one (because rem related to math too).
calc(400px)
it didnt compileI encountered an issue while working with variables. I had a
margin-step
variable and created classes like .m-1, .m-2 (similar to Tailwind). I also made a universal multiplier for spacing.i also think calculation maybe not working with dynamic values like width/height.
To Reproduce
margin: 4rem
Also you can check my media i just recorded all process of reproduce
Expected behavior
Media/Files
Additional context
No response