Can HTML and CSS be used within LightningJS app?

Hi everyone,

I am a total beginner with LightningJS framework and I am getting familiar with it. LightningJS framework is obviously an JavaScript framework, but I am wondering if HTML and CSS can be used in combination with this framework. For example, can I build some of my User Interfaces using HTML and CSS? If so, what are the pros and cons of doing this (will it affect the performance of the set-top-box, etc.)? Thank you

Hello!

Lightning Js is rendering the code inside of a canvas html tag. This way you might be able to do HTML & CSS around it but not inside it.

I suggest you work only with the Lightning Framework. I find the static _template() function to be written like the HTML Dom tree and the visual properties are based on CSS3 properties.

1 Like

HTML and CSS would make the app heavier and in the context of a STB it is much more efficient to use Lightning as it is intended.

That being said, you definitely can use HTML and CSS in your app.

1 Like