Main_Logoelterv1.0.5
⌘ K

On this page

cssx.global

Used to define global CSS.
There is no need to put it in a variable, you can preview it by importing it to the file you want to apply and loading it.

Write global and compile

In addition to html elements, global allows you to directly define attributes and class names for pseudo elements and class.

global.ts
import elter from 'elter'
 
elter.global({
  body: {
    color: 'var(--color-text)',
    background: 'var(--color-bg)',
    margin: '0 auto'
  },
  h2: {
    color: 'var(--color-heading)',
    fontSize: '30px',
    fontWeight: '550'
  },
  ".headings": {
    color: 'var(--color-heading)',
    fontSize: '24px',
    fontWeight: '450'
  }
});