Feb 3, 20261 min read

CSS Function Cheatsheet (Burmese)

Three sections covering custom @function structure, typed defaults, fluid typography with clamp(), plus the new range-style media query syntax.

Section 1: Basic Structure

Keyword: @function ကို သုံးရမယ်။ Naming: နာမည်ရှေ့မှာ -- ပါရမယ်။ Return: တန်ဖိုးပြန်ထုတ်ဖို့ result: ကို သုံးရမယ်။

[object Object], --make-transparent(--color, --opacity) {
  result: ,[object Object],(from ,[object Object],(--color) l c h / ,[object Object],(--opacity));
}

Section 2: Professional Usage (Types & Defaults)

Type သတ်မှတ်ခြင်း: <color>, <number>, <length> Multiple Types: type(<number> | <percentage>) Default Value: --param <type> : default-value

[object Object], --safe-color(--color <,[object Object],> : red, --opacity <number> : ,[object Object],) returns <,[object Object],> {
  result: ,[object Object],(from ,[object Object],(--color) l c h / ,[object Object],(--opacity));
}

Section 3: Responsive Design (Fluid Typography)

Media Query အစား clamp() ကို Function ထဲမှာ သုံးခြင်း။

[object Object], --fluid-size(--min <length>, --max <length>) {
  result: ,[object Object],(,[object Object],(--min), ,[object Object],vi, ,[object Object],(--max));
}

,[object Object],
,[object Object], { ,[object Object],: ,[object Object],(,[object Object],, ,[object Object],); }

New CSS Tip: Media Query Syntax

Old: @media (max-width: 1000px) -> Screen ၁၀၀၀ အောက်။ New: @media (width < 1000px) -> ပိုဖတ်ရလွယ်ကူတဲ့ သင်္ချာပုံစံ။ Range: (600px <= width <= 1000px) လို့ တဆက်တည်း ရေးလို့ရပြီ။ Browser Support: Chrome, Firefox, Edge နဲ့ Safari version အသစ်တွေအားလုံးမှာ ရနေပါပြီ။