Import Class
In the Runtime chapter, we saw how a Stylable stylesheet's API can be imported into a JavaScript module, and how that API can be used. In this chapter, we'll see how our game example can be divided into linked stylesheet modules to provide a better development experience.
Up to this point, we've talked mostly about a single stylesheet for our project (game.st.css
). Now we'll explore how to organize our code across multiple stylesheets.
Current status:
game.st.css
.board { /* ... */ }
.player {
-st-states: registered,
ranking(enum(first, second, third));
background: blue;
}