Skip to content

pantoken / foundation

foundation

実験的

@pantoken/foundation — Instructure のトークンで Foundation for Sites のテーマを適用します。

Foundation は Sass を第一に設計しているため、このパッケージは二層を提供します。 toFoundationSettings は、_settings スタイルの Sass パーシャルを出力し、Foundation の設定変数を var(--instui-*) に向けるので、Sass ビルドは Instructure の外観でコンパイルしつつ、同じカスタムプロパティでランタイムのテーマ付けを維持できます。 toFoundationCss は、共通のコンパイル済みクラス(.button.callout、リンク)を同様にテーマ化する薄い CSS オーバーレイを出力します — ストックの Foundation CSS を利用しつつ、再コンパイルせずに Instructure の色を上から重ねたい場合に便利です。

ts
import { foundationSettings, foundationCss } from "@pantoken/foundation";
// foundationSettings → a Sass partial; foundationCss → a runtime overlay.

インターフェース

変数

関数

参照

default

foundationCss の名前を変更して再エクスポートします。