© Khmer Angkor Academy - sophearithput168

Typography

Bootstrap Typography (អក្សរ​សិល្ប៍)

Bootstrap ផ្តល់​នូវ classes សម្រាប់​ធ្វើ​ការ​ទ្រង់ទ្រាយ​អត្ថបទ​បាន​ងាយស្រួល។ រួម​មាន headings, text utilities, colors, alignment, និង​ច្រើន​ទៀត។

📏 Heading Sizes & Display Headings

Heading Type Class/Tag Font Size Use Case
H1 Heading <h1> or .h1 2.5rem (40px) ចំណងជើង​ធំ​បំផុត - page title
H2 Heading <h2> or .h2 2rem (32px) Section headings
H3 Heading <h3> or .h3 1.75rem (28px) Subsection headings
H4 Heading <h4> or .h4 1.5rem (24px) Card titles, smaller sections
H5 Heading <h5> or .h5 1.25rem (20px) Minor headings
H6 Heading <h6> or .h6 1rem (16px) Smallest heading
Display 1 .display-1 5rem (80px) Hero sections - ធំ​ពិសេស​បំផុត
Display 2 .display-2 4.5rem (72px) Large landing page titles
Display 3 .display-3 4rem (64px) Major announcements
Display 4 .display-4 3.5rem (56px) Section intros
Display 5 .display-5 3rem (48px) Smaller displays
Display 6 .display-6 2.5rem (40px) Smallest display (same as h1)

🎨 Font Weight & Style

Class CSS Value Visual Effect Use Case
.fw-bold font-weight: 700 អក្សរ​ដិត (bold) Emphasis, headings, important text
.fw-bolder font-weight: bolder ដិត​ជាង​ parent Extra emphasis within bold text
.fw-semibold font-weight: 600 ពាក់កណ្តាល​ដិត Subtle emphasis, labels
.fw-medium font-weight: 500 មធ្យម Slightly emphasized text
.fw-normal font-weight: 400 ធម្មតា (default) Body text, paragraphs
.fw-light font-weight: 300 ស្តើង (light) Subtle text, secondary info
.fw-lighter font-weight: lighter ស្តើង​ជាង​ parent De-emphasized text
.fst-italic font-style: italic អក្សរ​ទ្រេត Quotes, emphasis, foreign words
.fst-normal font-style: normal អក្សរ​ធម្មតា Reset italic text

📝 Font Size Utilities

Class Size (rem) Size (px) Best For
.fs-1 2.5rem 40px ទំហំ​ធំ​បំផុត - large headings
.fs-2 2rem 32px Section headings
.fs-3 1.75rem 28px Subheadings
.fs-4 1.5rem 24px Card titles, lead text
.fs-5 1.25rem 20px Slightly larger body text
.fs-6 1rem 16px ទំហំ​ធម្មតា (default body text)

🔤 Text Transform & Decoration

Class CSS Property Effect Example
.text-lowercase text-transform: lowercase អក្សរ​តូច​ទាំងអស់ HELLO → hello
.text-uppercase text-transform: uppercase អក្សរ​ធំ​ទាំងអស់ hello → HELLO
.text-capitalize text-transform: capitalize អក្សរ​ដើម​ធំ​គ្រប់​ពាក្យ hello world → Hello World
.text-decoration-underline text-decoration: underline បន្ទាត់​ពី​ក្រោម Underlined text
.text-decoration-line-through text-decoration: line-through បន្ទាត់​ឆ្លង​កាត់ Strikethrough text
.text-decoration-none text-decoration: none គ្មាន​បន្ទាត់ (remove underline from links) Clean link text

📐 Text Alignment

Class Alignment Responsive Variants
.text-start តម្រឹម​ឆ្វេង (left align) .text-sm-start, .text-md-start, etc.
.text-center តម្រឹម​កណ្តាល (center) .text-sm-center, .text-md-center, etc.
.text-end តម្រឹម​ស្តាំ (right align) .text-sm-end, .text-md-end, etc.

📄 Text Wrapping & Overflow

Class Behavior Use Case
.text-wrap អត្ថបទ​រុំ​ទៅ​បន្ទាត់​ក្រោម (wrap normally) Long paragraphs, normal text flow
.text-nowrap មិន​រុំ (stay on one line) Buttons, labels, short phrases
.text-break បំបែក​ពាក្យ​វែង​ពេក (break long words) URLs, long unbreakable strings
.text-truncate កាត់​ជា ... (ellipsis overflow) Single-line truncated text, titles

💬 Special Typography Elements

Element/Class Purpose Styling
.lead អត្ថបទ​សំខាន់ (introductory paragraph) Larger font (1.25rem), lighter weight
.blockquote សម្រង់ (quotations) Left border, larger font, margin
.blockquote-footer អ្នក​និពន្ធ​សម្រង់ (quote attribution) Smaller, muted color
.list-unstyled List គ្មាន bullets Removes bullets and default padding
.list-inline List ផ្តេក (horizontal list) Items displayed inline
.list-inline-item Item នៃ inline list Horizontal spacing between items
<small> or .small អត្ថបទ​តូច (secondary text) 85% of parent font size
<mark> or .mark អត្ថបទ​លេច​ធ្លោ (highlighted text) Yellow background highlight

✅ Typography Best Practices

❌ Avoid ✅ Best Practice
Using display headings for regular content Reserve .display-* for hero sections and landing pages only
Mixing too many font weights in one paragraph Use 2-3 weights maximum for hierarchy (bold for emphasis, normal for body)
ALL CAPS TEXT EVERYWHERE (hard to read) Use .text-uppercase sparingly for labels, buttons, short headings
Long paragraphs without .lead intro Start articles/sections with .lead paragraph for better readability
Ignoring text hierarchy (all same size) Use h1-h6 properly: h1 for page title, h2 for sections, h3 for subsections
Overusing italic (.fst-italic) Use italic for quotes, emphasis, foreign words - not entire paragraphs
Centered text for long paragraphs Use .text-center for headings/short text; left-align body paragraphs
Forgetting .text-muted for secondary info Use .text-muted for timestamps, captions, less important text

Text Alignment


Text Transform & Weight


Display Headings


Lead & Blockquote