Custom prefix

Create a custom prefixed UIkit builds to avoid issues when using multiple UIkit versions side by side.

As we keep releasing newer versions of UIkit, some components or classes will be altered or dismissed, while more and more themes and extensions are built with UIkit and loaded on the same page. This might cause conflicts when classes that occur in both versions are working differently.

That's why you can custom prefix your UIkit version. Basically this will replace the usual uk- with whatever prefix you set.


Prefix via Less

If you are not familiar with the usage of gulp, check out our doc on automating preprocessing to find out how to create a UIkit build. To create a custom prefixed UIkit release just run gulp with your own prefix parameter -p to have all classes and JavaScript files custom prefixed.

gulp -p myprefix

After running gulp you'll find your custom prefixed build in the dist folder. e.g.:


                            .myprefix-grid { ... }
                            ...
                            

JavaScript noConflict mode

To prevent conflicts with multiple custom prefixed UIkit versions, just call the noConflict method after including UIkit:

var myUIkit = UIkit.noConflict();