Skip to content
Tom Wilson edited this page Jun 12, 2019 · 1 revision

ipress2

With MDsveX you can add css at the component level, but sometimes you may want to use a css framework or use some global styling for your site.

Here is how you could add bulma to your ipress2 site.

Install node-sass and bulma

npm install --save-dev node-sass bulma

Custom Sass

Create a sass folder and a global.scss file

mkdir sass
touch sass/global.scss

modify the sass file

@charset 'utf-8';

$primary: green;

@import './node_modules/bulma/bulma.sass';

Add a build step to your build script

package.json

{
  ...
  "scripts": {
    "build": "run-s ... build:css",
    "build:css": "node-sass sass/global.scss dist/global.css"
  }
}

Add a head link to your layout page

layout.svelte

<svelte:head>
  <link rel="stylesheet" href="/global.css">
</svelte:head>

Fin

npm run build
Clone this wiki locally