A utility to style headings within global HTML where Braid components cannot be used, e.g. styling strings of foreign markup.
Returns a vanilla-extract compatible object that needs to be passed through one of vanilla-extract’s styling APIs (e.g. ‘globalStyle’) to create the actual styles.
// styles.css.ts
import { style, globalStyle } from '@vanilla-extract/css';
import { globalHeadingStyle } from 'braid-design-system/css';

export const root = style({});

// Target all <h2> elements within the root class
globalStyle(`${root} h2`,
  globalHeadingStyle({ level: "2" })
);