Skip to content

pantoken / foundation

foundation

ทดลอง

@pantoken/foundation — ธีม Foundation for Sites พร้อมโทเค็นของ Instructure.

Foundation เป็นแนวทางที่ให้ความสำคัญกับ Sass ก่อนเป็นหลัก ดังนั้นแพ็กเกจนี้จึงประกอบด้วยสองเลเยอร์ toFoundationSettings จะส่งออก partial Sass แบบ _settings ที่ชี้ตัวแปรการตั้งค่า Foundation ไปยัง var(--instui-*) ดังนั้นการ build ด้วย Sass จะคอมไพล์ลุคของ Instructure ขณะที่ยังคงการปรับธีมใน runtime ผ่าน custom properties เดียวกัน toFoundationCss จะส่งออกแผ่นบางของ CSS ที่ปรับธีมคลาสที่คอมไพล์แล้วซึ่งใช้อย่างทั่วไป (.button, .callout, links) ให้เหมือนกัน — มีประโยชน์เมื่อคุณใช้ Foundation CSS ต้นฉบับและต้องการวางสีของ Instructure ทับด้านบนโดยไม่ต้องคอมไพล์ใหม่

ตัวอย่าง

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

อินเทอร์เฟซ

ตัวแปร

ฟังก์ชัน

การอ้างอิง

default

เปลี่ยนชื่อและส่งออกซ้ำ foundationCss