Okay
  Public Ticket #2844237
move inline css to global css
Open

Comments

  • Roli started the conversation

    Currently Unlimited Elements insert the inline <style> CSS next to the widget. What is the best way to move inline <style> to global or page css? (I still want to put my CSS inside the tab.)

  •   Max replied privately
  • Gary replied

    I'm interested in this topic also as I'm working on a site where I'm creating quite a few custom widgets which get reused multiple times on the same page, so having the same styles repeated inline for everytime the widget is used is not ideal, so if certain styles in custom widgets can be moved to global css rather than repated inline it would be ideal.

    Thanks

  •   Max replied privately
  • Gary replied

    Hi Max

    Not sure if you meant to reply to my recent message on the topic but I can't see it as seems to be private?

    Thanks

  •  759
    Amit replied

    HI, this one you can fix, by inserting some twig code in the editor: 

    3871762138.png

    or, you can put your code in css include file, then it will be run only once.

    of cause the css should not have any dynamic variables like {{uc_id}} inserted, because it should be run per widget.