SunSed way of coding requires you to create a function for every custom UI element and add the related CSS of the element right in the function declaration. This way, your element's CSS will only have to load if the element itself is in use on the requested page.


All you have to do is to caputre your CSS as a string and add it using template:css(), which automatically adds your CSS in the right place while ensuring you never add exact duplicate CSS code.

To capture your CSS, use the capture object start and end. Type an underscore (_), and the shortcut for creating a capture object start and end will appear in the pop-up, making the following empty structure.


$_ = $_;

Next, add your desired CSS between the closing and opening tags, and then add the captured variable into your App's CSS using template:css() function.

    .my_button {
        background-color: red;
$css = $_;
Copyright © SunSed LLC 2013-2022 All rights reserved.