concept style in category svelte

appears as: styles, style, style
Svelte and Sapper in Action

This is an excerpt from Manning's book Svelte and Sapper in Action.

  • Edit the provided files src/main.js and public/global.css. Global styles can be defined in a REPL app by defining them in the style element within App.svelte, enclosing them in the syntax :global(body) { ... }. This syntax is described in chapter 3.
  • .svelte files can contain at most one <script context="module"> element, one script element, one style element, and any number of HTML elements that can appear in a body element. Each of these are optional, and these elements can appear in any order. This means that something as simple as the following is a valid Svelte component: