Automatic.css Cheat Sheet – Dành cho BricksBuilder

Tra cứu nhanh các class & biến thường dùng của AutomaticCSS (ACSS). Tổng hợp và tóm lược từ tài liệu chính thức.

1. SPACING – Khoảng cách

NhómCú pháp / Ví dụChức năngGhi chú
Spacing Variables--space-xs--space-xxlBiến khoảng cách dùng cho margin, padding, gap, line-height…Fluid scale, đồng bộ toàn site
Margin Classes.margin--top--m, .margin--bottom--lThêm khoảng cách ngoài phần tửx = trái+phải, y = trên+dưới
Padding Classes.padding--l, .padding--x--mThêm khoảng cách trong phần tửDựa theo hệ T-shirt size
Section Padding.section--padding--mGiữ gutter & rhythm ngang nhất quánDùng cho section lớn
Gap Classes.gap--s, .gap--lKhoảng cách giữa child (grid/flex)Override dễ dàng trong grid

2. LAYOUT & GRID – Bố cục và lưới

NhómCú pháp / Ví dụChức năngGhi chú
Grid chuẩn.grid--2, .grid--3Chia đều cột con trong gridDựa trên display:grid
Auto Grids.grid--auto-3.grid--auto-12Tự động chia cộtAuto-fit, responsive
Ratio Grids.grid--auto-2-3, .grid--auto-3-2Lưới tỉ lệ hình/textPhù hợp layout media
Variable Grid.variable-gridTùy biến cột bằng custom propsDùng recipe riêng
Flex Grid.flex-grid, .flex--centerLayout linh hoạt, số lượng item không cố địnhDùng cho card list
Auto Alternating.auto-alt-gridTự đảo vị trí (hình trái/phải)Landing pages
Content Grid.content-gridBố cục chia vùng dọc (zones)Đa dụng cho section dài

3. TYPOGRAPHY – Kiểu chữ

NhómCú pháp / Ví dụChức năngGhi chú
Kích thước chữ.text--xs.text--xxlĐiều chỉnh cỡ chữFluid typography, theo scale
Độ đậm (weight).text--400, .text--700Font-weight
Kiểu chữ.text--italicFont-style
Gạch chân / Trang trí.text--underline, .text--line-throughText-decorationCó biến thể wavy, dotted
Chuyển đổi chữ.text--uppercase, .text--capitalizeText-transform
Căn chỉnh.text--center, .text--justifyText-align
Fluid Text(Auto)Tự co giãn theo viewportConfig trong Dashboard
Line Length(Dashboard)Giới hạn chiều rộng dòngCải thiện khả năng đọc

4. COLORS – Màu sắc

NhómCú pháp / Ví dụChức năngGhi chú
Màu nền.bg--base, .bg--primaryĐặt màu nền theo paletteShade: ultra-light → ultra-dark
Màu chữ.text--light, .text--darkĐặt màu chữTự đổi foreground khi nền thay đổi
Màu ngữ nghĩa.bg--success, .text--warningMàu trạng tháiSemantic colors
Tự động phối màu(Auto Color Relationships)Tự đảo màu chữ theo nềnGiữ contrast chuẩn
Biến màu--base, --primary-darkDùng trong custom CSSOverride dễ

5. BORDERS, RADIUS & SHADOWS

NhómCú pháp / Ví dụChức năngGhi chú
Bo góc (Radius).radius--s, .radius--circleTạo bo trònTheo scale
Viền (Border).border--base, .border--lightÁp dụng màu viền
Bóng đổ.shadow--s, .shadow--xlThêm độ sâu

6. COMPONENTS – Thành phần UI

NhómCú pháp / Ví dụChức năngGhi chú
Buttons.btn--primary, .btn--outlineNút theo hệ màuCó hover/focus mặc định
Cards.card, .card--shadowKhung nội dung chuẩnMix radius/shadow dễ
Forms(Auto styled)Style form đồng nhấtBật trong Dashboard

7. HELPERS – Tiện ích hỗ trợ

NhómCú pháp / Ví dụChức năngGhi chú
Breakout.breakout--full, .breakout--widePhần tử tràn containerDùng cho banner/media
List Reset.list--noneXóa style mặc định listCó recipe @list-none;
Display / Position.d--flex, .pos--relativeĐiều khiển hiển thịDễ phối hợp layout
Focus.focus--primary, .focus-parentHiệu ứng focusHỗ trợ accessibility
Clickables.clickable-parentCho phép click toàn khốiThường dùng cho card/box

8. RESPONSIVE SYSTEM

NhómCú pháp / Ví dụChức năngGhi chú
Breakpoint Prefixes@xs, @m, @l, @xlÁp dụng class theo kích thướcVí dụ .pad--l@m
Fluid Values(Auto)Tự co giãn giữa breakpointTính toán sẵn theo scale
Container Width(Dashboard)Max width sectionẢnh hưởng grid/gutter

9. VARIABLES – Biến toàn hệ thống

NhómVí dụMô tả
Spacing--space-xs--space-xxlKhoảng cách toàn hệ thống
Colors--base, --primary, --accentMàu và sắc độ
Typography--text-m, --h1, --h2Cỡ chữ cơ bản
Radius / Shadow--radius-s, --shadow-xlBo góc & bóng đổ
Container Width--container-max, --content-maxGiới hạn chiều rộng nội dung

10. NGUỒN THAM KHẢO

Let's get started!

Owning your exciting website with great Builders from Wordpress, let's explore No-Code with D-Solutions

Start buiding your website

Transforming ideas into websites everyone loves with WordPress Page Builders.