กลับไปหน้า Tools

GetNotes Tools

primer/css

Tool นี้คืออะไร

`Primer CSS` คือการนำระบบดีไซน์ `Primer` ของ `GitHub` มาใช้ในรูปแบบ CSS ซึ่งเหมาะสำหรับนักพัฒนาที่ต้องการใช้คลาสยูทิลิตี้ที่มีอยู่เพื่อจัดสไตล์ตามแนวทางของ `GitHub` อย่างไรก็ตาม โครงการนี้อยู่ในโหมดบำรุงรักษา จึงแนะนำให้ใช้ `primer/react` หรือ `primer/view_components` สำหรับแพทเทิร์นที่สมบูรณ์กว่า

ข้อมูลโปรเจกต์

ดาว

13K

Forks

1.3K

License

MIT

อัปเดต GitHub ล่าสุด

28 ก.ค. 2569

เพิ่มใน GetNotes

14 ก.ค. 2569

Repository

primer/css

รูปแบบ

Library / SDK

เหมาะกับงาน

UI Librariesออกแบบ UI/UX

เหมาะกับอาชีพ

Ecosystem

SCSS

แปลและเรียบเรียงโดย AI

เนื้อหาฉบับภาษาไทย

ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง

Primer CSS

การนำระบบดีไซน์ Primer ของ GitHub มาใช้ในรูปแบบ CSS

npm package build status contributors graph last commit license

:warning: โครงการนี้อยู่ในโหมดบำรุงรักษา (KTLO)! ใช้คลาสยูทิลิตี้ที่มีอยู่จากโครงการนี้เมื่อจำเป็น สำหรับแพทเทิร์นที่สมบูรณ์ยิ่งขึ้นซึ่งรวมถึงการจัดสไตล์และมาร์กอัป โปรดใช้ primer/react หรือหากจำเป็น ให้ใช้ primer/view_components

เอกสารประกอบ

เว็บไซต์เอกสารของเราอยู่ที่ primer.style/css คุณจะพบเอกสารโดยละเอียดเกี่ยวกับการเริ่มต้นใช้งาน คอมโพเนนต์ทั้งหมด ธีมของเรา หลักการของเรา และอื่นๆ อีกมากมาย

การติดตั้ง

ที่เก็บนี้เผยแพร่ด้วย npm หลังจาก ติดตั้ง npm คุณสามารถติดตั้ง @primer/css ด้วยคำสั่งนี้:

sh
npm install --save @primer/css

การใช้งาน

ไฟล์ต้นฉบับที่รวมอยู่เขียนด้วย Sass โดยใช้ไวยากรณ์ SCSS เมื่อติดตั้งแล้ว คุณสามารถเพิ่มไดเรกทอรี node_modules ของโปรเจกต์ของคุณไปยัง include paths ของ Sass (หรือที่เรียกว่า load paths ใน Ruby) จากนั้นนำเข้าได้ดังนี้:

scss
@import "@primer/css/index.scss";

คุณสามารถนำเข้าโมดูล Primer แต่ละรายการได้โดยตรงจากแพ็กเกจ @primer/css:

scss
@import "@primer/css/core/index.scss";
@import "@primer/css/product/index.scss";
@import "@primer/css/marketing/index.scss";

การพัฒนา

ดู DEVELOP.md สำหรับเอกสารการพัฒนา

การเผยแพร่ (สำหรับพนักงาน GitHub)

คุณสามารถดูเอกสารเกี่ยวกับกระบวนการเผยแพร่ของเราได้ใน RELEASING.md

ใบอนุญาต

MIT © GitHub

เอกสารโปรเจกต์

อ่านเอกสารต้นฉบับ

README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

ดูไฟล์บน GitHub

Primer CSS

The CSS implementation of GitHub's Primer Design System

npm package build status contributors graph last commit license

:warning: This project is in KTLO mode! Use existing utility classes from this project where needed. For more complete patterns that include styling and markup, please use primer/react or, if necessary, primer/view_components.

Documentation

Our documentation site lives at primer.style/css. You'll be able to find detailed documentation on getting started, all of the components, our theme, our principles, and more.

Install

This repository is distributed with npm. After installing npm, you can install @primer/css with this command:

sh
npm install --save @primer/css

Usage

The included source files are written in Sass using SCSS syntax. Once installed, you can add your project's node_modules directory to your Sass include paths (AKA load paths in Ruby), then import it like this:

scss
@import "@primer/css/index.scss";

You can import individual Primer modules directly from the @primer/css package:

scss
@import "@primer/css/core/index.scss";
@import "@primer/css/product/index.scss";
@import "@primer/css/marketing/index.scss";

Development

See DEVELOP.md for development docs.

Releasing (for GitHub staff)

You can find docs about our release process in RELEASING.md.

License

MIT © GitHub

#css#design-system#design-systems#framework#meta#primer#primer-css#sass#styleguide#ui-components