PricingBlog

Page theme in formula editor

  • riisud-1461835420252901549

    Riisud

    22 hours ago

    Hi, what is the purpose of this in the formula editor and why is it empty?? It is listed under page. What can i do with it?
    1461835420953346301-image.png
  • lucasg-1461836058848133195

    Lucas G

    22 hours ago

    That's there because you enabled the v2 style variables flag that's under development
  • Official docs aren't out for it since it is still being worked on
  • But essentially, it will let you determine the current theme selected in the app
  • It's undefined probably because the theme styles sheet hasn't been migrated yet
  • As the feature flags page states, migrate at your own risk
  • riisud-1461836714824962098

    Riisud

    21 hours ago

    but its a new project so i dont even know where i can find this v2 style variable flag. But nevertheless, this will mean that in the future we could potentially use our theme variables directly in the formula editor?
  • lucasg-1461836932001829006

    Lucas G

    21 hours ago

    When you enable a flag it does it for the entire account, not per project
  • What this will let you do is set app theme (light, dark, etc)
  • riisud-1461837182972198972

    Riisud

    21 hours ago

    aah ok, where can i find the flag then?
  • lucasg-1461837258041725009

    Lucas G

    21 hours ago

    editor.nordcraft.com/flags
  • riisud-1461837489005400124

    Riisud

    21 hours ago

    its not enabled for me though.
    1461837488619520052-image.png
  • lucasg-1461837792773669045

    Lucas G

    21 hours ago

    ah that may be a bug then
  • it's fine to ignore that node for now since it doesn't do anything on its own
  • it may be that the feature is close to launching but this accidentally slipped past the feature flags
  • riisud-1461838071526850711

    Riisud

    21 hours ago

    ok, to bad. was hoping it'd be to use the variables we declared in the default theme. it be easy then to create the variants.
  • lucasg-1461838256642457650

    Lucas G

    21 hours ago

    I don't think that this will be a thing any time soon. Usually you declare your variants in the stylesheet
  • Or just use a custom action for edge cases
  • riisud-1461838347319251069

    Riisud

    21 hours ago

    thats what i'm going to do now, with classes
  • riisud-1461838716191506654

    Riisud

    21 hours ago

    but like chris showed in my other post with the object node and get node how they were doing it. It works but the variables are hard coded so if i want to change my primary color i have to update every style variable so i'll do it with classes that works aswell.
    👍1
  • lucasg-1461839076486283497

    Lucas G

    21 hours ago

    you can use theme variables in component style variables too
  • that might help
  • as long as the theme variable's name stays the same then the style variable will update correctly
  • riisud-1461840381984505896

    Riisud

    21 hours ago

    thats also true. How would you do it in a style variable? How i wrote it for primary full, since the variable name should not change anymore or like the secondary with a concatenate?
    1461840381711749335-image.png
  • Tod-1461840383700107531

    Tod

    21 hours ago

    Great job @Riisud! Your contribution to the Nordcraft Community just made you advance to Community Level 2! 🌲
  • lucasg-1461867773897736193

    Lucas G

    19 hours ago

    Concatenate would only matter here if you’re defining the token names in a variable
  • lucasg-1461868177012166698

    Lucas G

    19 hours ago

    Kinda like how the Spark One starter template does it