@edmicro/olkit 2.1.8 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/fesm2022/edmicro-olkit.mjs +20024 -34416
- package/fesm2022/edmicro-olkit.mjs.map +1 -1
- package/lib/shared/styles/animations.css +327 -327
- package/package.json +1 -1
- package/styles/isolation.css +310 -310
- package/styles/layout.css +94 -94
- package/styles/patterns.css +163 -163
- package/styles/primitives.css +274 -274
- package/styles/theme.css +325 -325
- package/styles/tokens.css +431 -431
- package/types/edmicro-olkit.d.ts +7212 -12029
- package/types/edmicro-olkit.d.ts.map +1 -1
package/styles/layout.css
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
/* Primitives: Spacing, Radius, Typography, Shadows & Container Tokens từ Figma Ôn Luyện Design System */
|
|
2
|
-
:root {
|
|
3
|
-
/* 1. Complete Spacing Scale (36 values từ Figma) */
|
|
4
|
-
--spacing-0: 0px;
|
|
5
|
-
--spacing-0_5: 0.125rem; /* 2px */
|
|
6
|
-
--spacing-1: 0.25rem; /* 4px */
|
|
7
|
-
--spacing-1_5: 0.375rem; /* 6px */
|
|
8
|
-
--spacing-2: 0.5rem; /* 8px */
|
|
9
|
-
--spacing-2_5: 0.625rem; /* 10px */
|
|
10
|
-
--spacing-3: 0.75rem; /* 12px */
|
|
11
|
-
--spacing-3_5: 0.875rem; /* 14px */
|
|
12
|
-
--spacing-4: 1rem; /* 16px */
|
|
13
|
-
--spacing-4_5: 1.125rem; /* 18px */
|
|
14
|
-
--spacing-5: 1.25rem; /* 20px */
|
|
15
|
-
--spacing-6: 1.5rem; /* 24px */
|
|
16
|
-
--spacing-7: 1.75rem; /* 28px */
|
|
17
|
-
--spacing-8: 2rem; /* 32px */
|
|
18
|
-
--spacing-9: 2.25rem; /* 36px */
|
|
19
|
-
--spacing-10: 2.5rem; /* 40px */
|
|
20
|
-
--spacing-11: 2.75rem; /* 44px */
|
|
21
|
-
--spacing-12: 3rem; /* 48px */
|
|
22
|
-
--spacing-14: 3.5rem; /* 56px */
|
|
23
|
-
--spacing-16: 4rem; /* 64px */
|
|
24
|
-
--spacing-20: 5rem; /* 80px */
|
|
25
|
-
--spacing-24: 6rem; /* 96px */
|
|
26
|
-
--spacing-28: 7rem; /* 112px */
|
|
27
|
-
--spacing-32: 8rem; /* 128px */
|
|
28
|
-
--spacing-36: 9rem; /* 144px */
|
|
29
|
-
--spacing-40: 10rem; /* 160px */
|
|
30
|
-
--spacing-44: 11rem; /* 176px */
|
|
31
|
-
--spacing-48: 12rem; /* 192px */
|
|
32
|
-
--spacing-52: 13rem; /* 208px */
|
|
33
|
-
--spacing-56: 14rem; /* 224px */
|
|
34
|
-
--spacing-60: 15rem; /* 240px */
|
|
35
|
-
--spacing-64: 16rem; /* 256px */
|
|
36
|
-
|
|
37
|
-
/* 2. Border Radius Scale — khai TRONG tokens.css, không lặp lại ở đây.
|
|
38
|
-
Trước đây 11 biến radius khai trùng cả hai nơi với giá trị y hệt; tokens.css
|
|
39
|
-
nạp sau nên luôn thắng, sửa ở file này không có tác dụng gì. tokens.css còn
|
|
40
|
-
đủ hơn: nó có --radius-md mà file này thiếu, trong khi isolation.css dựa vào
|
|
41
|
-
đúng biến đó cho bo góc mặc định của mọi nút. */
|
|
42
|
-
|
|
43
|
-
/* 3. Border Width Scale */
|
|
44
|
-
--border-width-0: 0px;
|
|
45
|
-
--border-width-1: 1px;
|
|
46
|
-
--border-width-2: 2px;
|
|
47
|
-
--border-width-4: 4px;
|
|
48
|
-
--border-width-8: 8px;
|
|
49
|
-
|
|
50
|
-
/* 4. Typography Primitives (Font Size & Line Height) */
|
|
51
|
-
--font-size-2xs: 0.625rem; /* 10px / lh: 14px */
|
|
52
|
-
--font-size-xs: 0.75rem; /* 12px / lh: 16px */
|
|
53
|
-
--font-size-sm: 0.875rem; /* 14px / lh: 20px */
|
|
54
|
-
--font-size-base: 1rem; /* 16px / lh: 24px */
|
|
55
|
-
--font-size-lg: 1.125rem; /* 18px / lh: 28px */
|
|
56
|
-
--font-size-xl: 1.25rem; /* 20px / lh: 28px */
|
|
57
|
-
--font-size-2xl: 1.5rem; /* 24px / lh: 32px */
|
|
58
|
-
--font-size-3xl: 1.875rem; /* 30px / lh: 36px */
|
|
59
|
-
--font-size-4xl: 2.25rem; /* 36px / lh: 40px */
|
|
60
|
-
--font-size-5xl: 3rem; /* 48px / lh: 48px */
|
|
61
|
-
--font-size-6xl: 3.75rem; /* 60px / lh: 60px */
|
|
62
|
-
|
|
63
|
-
/* Font Weights */
|
|
64
|
-
--font-weight-regular: 400;
|
|
65
|
-
--font-weight-medium: 500;
|
|
66
|
-
--font-weight-semibold: 600;
|
|
67
|
-
--font-weight-bold: 700;
|
|
68
|
-
--font-weight-extrabold: 800;
|
|
69
|
-
|
|
70
|
-
/* 5. Box Shadows */
|
|
71
|
-
--shadow-2xs: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
|
|
72
|
-
--shadow-xs: 0px 1px 0.5px 0.05px rgba(30, 41, 57, 0.02);
|
|
73
|
-
--shadow-sm: 0px 1px 2px 0px rgba(30, 41, 57, 0.05);
|
|
74
|
-
--shadow-base: 0px 1px 3px 0px rgba(30, 41, 57, 0.1), 0px 1px 2px -1px rgba(30, 41, 57, 0.1);
|
|
75
|
-
--shadow-md: 0px 4px 6px -1px rgba(30, 41, 57, 0.1), 0px 2px 4px -2px rgba(30, 41, 57, 0.1);
|
|
76
|
-
--shadow-lg: 0px 10px 15px -3px rgba(30, 41, 57, 0.1), 0px 4px 6px -4px rgba(30, 41, 57, 0.1);
|
|
77
|
-
--shadow-xl: 0px 20px 25px -5px rgba(30, 41, 57, 0.1), 0px 8px 10px -6px rgba(30, 41, 57, 0.1);
|
|
78
|
-
--shadow-2xl: 0px 25px 50px -12px rgba(30, 41, 57, 0.25);
|
|
79
|
-
--shadow-inner: inset 0px 2px 4px 0px rgba(30, 41, 57, 0.06);
|
|
80
|
-
--shadow-top: 0px -2px 6px 0px rgba(30, 41, 57, 0.08);
|
|
81
|
-
|
|
82
|
-
/* 6. Container Max Widths */
|
|
83
|
-
--container-xs: 20rem; /* 320px */
|
|
84
|
-
--container-sm: 24rem; /* 384px */
|
|
85
|
-
--container-md: 28rem; /* 448px */
|
|
86
|
-
--container-lg: 32rem; /* 512px */
|
|
87
|
-
--container-xl: 36rem; /* 576px */
|
|
88
|
-
--container-2xl: 42rem; /* 672px */
|
|
89
|
-
--container-3xl: 48rem; /* 768px */
|
|
90
|
-
--container-4xl: 56rem; /* 896px */
|
|
91
|
-
--container-5xl: 64rem; /* 1024px */
|
|
92
|
-
--container-6xl: 72rem; /* 1152px */
|
|
93
|
-
--container-7xl: 80rem; /* 1280px */
|
|
94
|
-
}
|
|
1
|
+
/* Primitives: Spacing, Radius, Typography, Shadows & Container Tokens từ Figma Ôn Luyện Design System */
|
|
2
|
+
:root {
|
|
3
|
+
/* 1. Complete Spacing Scale (36 values từ Figma) */
|
|
4
|
+
--spacing-0: 0px;
|
|
5
|
+
--spacing-0_5: 0.125rem; /* 2px */
|
|
6
|
+
--spacing-1: 0.25rem; /* 4px */
|
|
7
|
+
--spacing-1_5: 0.375rem; /* 6px */
|
|
8
|
+
--spacing-2: 0.5rem; /* 8px */
|
|
9
|
+
--spacing-2_5: 0.625rem; /* 10px */
|
|
10
|
+
--spacing-3: 0.75rem; /* 12px */
|
|
11
|
+
--spacing-3_5: 0.875rem; /* 14px */
|
|
12
|
+
--spacing-4: 1rem; /* 16px */
|
|
13
|
+
--spacing-4_5: 1.125rem; /* 18px */
|
|
14
|
+
--spacing-5: 1.25rem; /* 20px */
|
|
15
|
+
--spacing-6: 1.5rem; /* 24px */
|
|
16
|
+
--spacing-7: 1.75rem; /* 28px */
|
|
17
|
+
--spacing-8: 2rem; /* 32px */
|
|
18
|
+
--spacing-9: 2.25rem; /* 36px */
|
|
19
|
+
--spacing-10: 2.5rem; /* 40px */
|
|
20
|
+
--spacing-11: 2.75rem; /* 44px */
|
|
21
|
+
--spacing-12: 3rem; /* 48px */
|
|
22
|
+
--spacing-14: 3.5rem; /* 56px */
|
|
23
|
+
--spacing-16: 4rem; /* 64px */
|
|
24
|
+
--spacing-20: 5rem; /* 80px */
|
|
25
|
+
--spacing-24: 6rem; /* 96px */
|
|
26
|
+
--spacing-28: 7rem; /* 112px */
|
|
27
|
+
--spacing-32: 8rem; /* 128px */
|
|
28
|
+
--spacing-36: 9rem; /* 144px */
|
|
29
|
+
--spacing-40: 10rem; /* 160px */
|
|
30
|
+
--spacing-44: 11rem; /* 176px */
|
|
31
|
+
--spacing-48: 12rem; /* 192px */
|
|
32
|
+
--spacing-52: 13rem; /* 208px */
|
|
33
|
+
--spacing-56: 14rem; /* 224px */
|
|
34
|
+
--spacing-60: 15rem; /* 240px */
|
|
35
|
+
--spacing-64: 16rem; /* 256px */
|
|
36
|
+
|
|
37
|
+
/* 2. Border Radius Scale — khai TRONG tokens.css, không lặp lại ở đây.
|
|
38
|
+
Trước đây 11 biến radius khai trùng cả hai nơi với giá trị y hệt; tokens.css
|
|
39
|
+
nạp sau nên luôn thắng, sửa ở file này không có tác dụng gì. tokens.css còn
|
|
40
|
+
đủ hơn: nó có --radius-md mà file này thiếu, trong khi isolation.css dựa vào
|
|
41
|
+
đúng biến đó cho bo góc mặc định của mọi nút. */
|
|
42
|
+
|
|
43
|
+
/* 3. Border Width Scale */
|
|
44
|
+
--border-width-0: 0px;
|
|
45
|
+
--border-width-1: 1px;
|
|
46
|
+
--border-width-2: 2px;
|
|
47
|
+
--border-width-4: 4px;
|
|
48
|
+
--border-width-8: 8px;
|
|
49
|
+
|
|
50
|
+
/* 4. Typography Primitives (Font Size & Line Height) */
|
|
51
|
+
--font-size-2xs: 0.625rem; /* 10px / lh: 14px */
|
|
52
|
+
--font-size-xs: 0.75rem; /* 12px / lh: 16px */
|
|
53
|
+
--font-size-sm: 0.875rem; /* 14px / lh: 20px */
|
|
54
|
+
--font-size-base: 1rem; /* 16px / lh: 24px */
|
|
55
|
+
--font-size-lg: 1.125rem; /* 18px / lh: 28px */
|
|
56
|
+
--font-size-xl: 1.25rem; /* 20px / lh: 28px */
|
|
57
|
+
--font-size-2xl: 1.5rem; /* 24px / lh: 32px */
|
|
58
|
+
--font-size-3xl: 1.875rem; /* 30px / lh: 36px */
|
|
59
|
+
--font-size-4xl: 2.25rem; /* 36px / lh: 40px */
|
|
60
|
+
--font-size-5xl: 3rem; /* 48px / lh: 48px */
|
|
61
|
+
--font-size-6xl: 3.75rem; /* 60px / lh: 60px */
|
|
62
|
+
|
|
63
|
+
/* Font Weights */
|
|
64
|
+
--font-weight-regular: 400;
|
|
65
|
+
--font-weight-medium: 500;
|
|
66
|
+
--font-weight-semibold: 600;
|
|
67
|
+
--font-weight-bold: 700;
|
|
68
|
+
--font-weight-extrabold: 800;
|
|
69
|
+
|
|
70
|
+
/* 5. Box Shadows */
|
|
71
|
+
--shadow-2xs: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
|
|
72
|
+
--shadow-xs: 0px 1px 0.5px 0.05px rgba(30, 41, 57, 0.02);
|
|
73
|
+
--shadow-sm: 0px 1px 2px 0px rgba(30, 41, 57, 0.05);
|
|
74
|
+
--shadow-base: 0px 1px 3px 0px rgba(30, 41, 57, 0.1), 0px 1px 2px -1px rgba(30, 41, 57, 0.1);
|
|
75
|
+
--shadow-md: 0px 4px 6px -1px rgba(30, 41, 57, 0.1), 0px 2px 4px -2px rgba(30, 41, 57, 0.1);
|
|
76
|
+
--shadow-lg: 0px 10px 15px -3px rgba(30, 41, 57, 0.1), 0px 4px 6px -4px rgba(30, 41, 57, 0.1);
|
|
77
|
+
--shadow-xl: 0px 20px 25px -5px rgba(30, 41, 57, 0.1), 0px 8px 10px -6px rgba(30, 41, 57, 0.1);
|
|
78
|
+
--shadow-2xl: 0px 25px 50px -12px rgba(30, 41, 57, 0.25);
|
|
79
|
+
--shadow-inner: inset 0px 2px 4px 0px rgba(30, 41, 57, 0.06);
|
|
80
|
+
--shadow-top: 0px -2px 6px 0px rgba(30, 41, 57, 0.08);
|
|
81
|
+
|
|
82
|
+
/* 6. Container Max Widths */
|
|
83
|
+
--container-xs: 20rem; /* 320px */
|
|
84
|
+
--container-sm: 24rem; /* 384px */
|
|
85
|
+
--container-md: 28rem; /* 448px */
|
|
86
|
+
--container-lg: 32rem; /* 512px */
|
|
87
|
+
--container-xl: 36rem; /* 576px */
|
|
88
|
+
--container-2xl: 42rem; /* 672px */
|
|
89
|
+
--container-3xl: 48rem; /* 768px */
|
|
90
|
+
--container-4xl: 56rem; /* 896px */
|
|
91
|
+
--container-5xl: 64rem; /* 1024px */
|
|
92
|
+
--container-6xl: 72rem; /* 1152px */
|
|
93
|
+
--container-7xl: 80rem; /* 1280px */
|
|
94
|
+
}
|
package/styles/patterns.css
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Hoạ tiết nền Ôn Luyện — 20 kiểu của Figma component "Pattern"
|
|
3
|
-
* (canvas "▒ Hoạ tiết" #1240:55097), dùng qua `<ol-pattern type="…">`.
|
|
4
|
-
*
|
|
5
|
-
* ## Vì sao file riêng, KHÔNG gộp vào olkit.css
|
|
6
|
-
*
|
|
7
|
-
* 20 file SVG nặng 1,1 MB (đã nén SVGO; bản xuất Figma 2,8 MB). Nhúng vào
|
|
8
|
-
* JS hay vào olkit.css thì app nào import kit cũng mang theo. Ở đây mỗi kiểu
|
|
9
|
-
* là một file SVG RIÊNG, CSS `mask-image: url(...)` trỏ tới — Angular CLI chép
|
|
10
|
-
* file theo, trình duyệt chỉ TẢI kiểu đang hiện trên trang.
|
|
11
|
-
*
|
|
12
|
-
* angular.json → "styles": [..., "node_modules/@edmicro/olkit/styles/patterns.css"]
|
|
13
|
-
*
|
|
14
|
-
* ## Vì sao mask, không background-image
|
|
15
|
-
*
|
|
16
|
-
* Mask lấy KÊNH ALPHA của SVG làm khuôn, màu là `background-color:
|
|
17
|
-
* currentColor` — một hoạ tiết dùng được mọi màu (trắng trên navy, brand trên
|
|
18
|
-
* nền sáng) qua class `text-*`, không cần 20 × N bản màu. Độ mờ từng nét trong
|
|
19
|
-
* Figma (stroke-opacity) vẫn giữ vì nằm trong kênh alpha.
|
|
20
|
-
*
|
|
21
|
-
* Bản xuất Figma kèm nền xám #F0F0F0, khung nền tối #101828 và viền #E5E7EB
|
|
22
|
-
* của frame — đã lọc, chỉ giữ nhóm `Type=…`.
|
|
23
|
-
*/
|
|
24
|
-
.ol-pattern {
|
|
25
|
-
background-color: currentColor;
|
|
26
|
-
-webkit-mask-repeat: no-repeat;
|
|
27
|
-
mask-repeat: no-repeat;
|
|
28
|
-
-webkit-mask-position: center;
|
|
29
|
-
mask-position: center;
|
|
30
|
-
-webkit-mask-size: cover;
|
|
31
|
-
mask-size: cover;
|
|
32
|
-
}
|
|
33
|
-
.ol-pattern--fit-contain {
|
|
34
|
-
-webkit-mask-size: contain;
|
|
35
|
-
mask-size: contain;
|
|
36
|
-
}
|
|
37
|
-
/* Lặp ô gốc theo kích thước thật của hình Figma (~1512×776). */
|
|
38
|
-
.ol-pattern--fit-repeat {
|
|
39
|
-
-webkit-mask-repeat: repeat;
|
|
40
|
-
mask-repeat: repeat;
|
|
41
|
-
-webkit-mask-size: auto;
|
|
42
|
-
mask-size: auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Figma: Type=Lines */
|
|
46
|
-
.ol-pattern--lines {
|
|
47
|
-
-webkit-mask-image: url('./patterns/lines.svg');
|
|
48
|
-
mask-image: url('./patterns/lines.svg');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* Figma: Type=Rounded Lines */
|
|
52
|
-
.ol-pattern--rounded-lines {
|
|
53
|
-
-webkit-mask-image: url('./patterns/rounded-lines.svg');
|
|
54
|
-
mask-image: url('./patterns/rounded-lines.svg');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Figma: Type=Creative */
|
|
58
|
-
.ol-pattern--creative {
|
|
59
|
-
-webkit-mask-image: url('./patterns/creative.svg');
|
|
60
|
-
mask-image: url('./patterns/creative.svg');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Figma: Type=Diamond right */
|
|
64
|
-
.ol-pattern--diamond-right {
|
|
65
|
-
-webkit-mask-image: url('./patterns/diamond-right.svg');
|
|
66
|
-
mask-image: url('./patterns/diamond-right.svg');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Figma: Type=Diamond left */
|
|
70
|
-
.ol-pattern--diamond-left {
|
|
71
|
-
-webkit-mask-image: url('./patterns/diamond-left.svg');
|
|
72
|
-
mask-image: url('./patterns/diamond-left.svg');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Figma: Type=Vertical lines */
|
|
76
|
-
.ol-pattern--vertical-lines {
|
|
77
|
-
-webkit-mask-image: url('./patterns/vertical-lines.svg');
|
|
78
|
-
mask-image: url('./patterns/vertical-lines.svg');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Figma: Type=oblique lines */
|
|
82
|
-
.ol-pattern--oblique-lines {
|
|
83
|
-
-webkit-mask-image: url('./patterns/oblique-lines.svg');
|
|
84
|
-
mask-image: url('./patterns/oblique-lines.svg');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* Figma: Type=Dots */
|
|
88
|
-
.ol-pattern--dots {
|
|
89
|
-
-webkit-mask-image: url('./patterns/dots.svg');
|
|
90
|
-
mask-image: url('./patterns/dots.svg');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Figma: Type=Lines modern */
|
|
94
|
-
.ol-pattern--lines-modern {
|
|
95
|
-
-webkit-mask-image: url('./patterns/lines-modern.svg');
|
|
96
|
-
mask-image: url('./patterns/lines-modern.svg');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* Figma: Type=Squares */
|
|
100
|
-
.ol-pattern--squares {
|
|
101
|
-
-webkit-mask-image: url('./patterns/squares.svg');
|
|
102
|
-
mask-image: url('./patterns/squares.svg');
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Figma: Type=Modern */
|
|
106
|
-
.ol-pattern--modern {
|
|
107
|
-
-webkit-mask-image: url('./patterns/modern.svg');
|
|
108
|
-
mask-image: url('./patterns/modern.svg');
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* Figma: Type=comb */
|
|
112
|
-
.ol-pattern--comb {
|
|
113
|
-
-webkit-mask-image: url('./patterns/comb.svg');
|
|
114
|
-
mask-image: url('./patterns/comb.svg');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Figma: Type=tech */
|
|
118
|
-
.ol-pattern--tech {
|
|
119
|
-
-webkit-mask-image: url('./patterns/tech.svg');
|
|
120
|
-
mask-image: url('./patterns/tech.svg');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Figma: Type=tech-square */
|
|
124
|
-
.ol-pattern--tech-square {
|
|
125
|
-
-webkit-mask-image: url('./patterns/tech-square.svg');
|
|
126
|
-
mask-image: url('./patterns/tech-square.svg');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* Figma: Type=tech-squares */
|
|
130
|
-
.ol-pattern--tech-squares {
|
|
131
|
-
-webkit-mask-image: url('./patterns/tech-squares.svg');
|
|
132
|
-
mask-image: url('./patterns/tech-squares.svg');
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/* Figma: Type=technology */
|
|
136
|
-
.ol-pattern--technology {
|
|
137
|
-
-webkit-mask-image: url('./patterns/technology.svg');
|
|
138
|
-
mask-image: url('./patterns/technology.svg');
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* Figma: Type=comb-linear */
|
|
142
|
-
.ol-pattern--comb-linear {
|
|
143
|
-
-webkit-mask-image: url('./patterns/comb-linear.svg');
|
|
144
|
-
mask-image: url('./patterns/comb-linear.svg');
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/* Figma: Type=big-comb */
|
|
148
|
-
.ol-pattern--big-comb {
|
|
149
|
-
-webkit-mask-image: url('./patterns/big-comb.svg');
|
|
150
|
-
mask-image: url('./patterns/big-comb.svg');
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* Figma: Type=lines-oblique */
|
|
154
|
-
.ol-pattern--lines-oblique {
|
|
155
|
-
-webkit-mask-image: url('./patterns/lines-oblique.svg');
|
|
156
|
-
mask-image: url('./patterns/lines-oblique.svg');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/* Figma: Type=technology-top */
|
|
160
|
-
.ol-pattern--technology-top {
|
|
161
|
-
-webkit-mask-image: url('./patterns/technology-top.svg');
|
|
162
|
-
mask-image: url('./patterns/technology-top.svg');
|
|
163
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Hoạ tiết nền Ôn Luyện — 20 kiểu của Figma component "Pattern"
|
|
3
|
+
* (canvas "▒ Hoạ tiết" #1240:55097), dùng qua `<ol-pattern type="…">`.
|
|
4
|
+
*
|
|
5
|
+
* ## Vì sao file riêng, KHÔNG gộp vào olkit.css
|
|
6
|
+
*
|
|
7
|
+
* 20 file SVG nặng 1,1 MB (đã nén SVGO; bản xuất Figma 2,8 MB). Nhúng vào
|
|
8
|
+
* JS hay vào olkit.css thì app nào import kit cũng mang theo. Ở đây mỗi kiểu
|
|
9
|
+
* là một file SVG RIÊNG, CSS `mask-image: url(...)` trỏ tới — Angular CLI chép
|
|
10
|
+
* file theo, trình duyệt chỉ TẢI kiểu đang hiện trên trang.
|
|
11
|
+
*
|
|
12
|
+
* angular.json → "styles": [..., "node_modules/@edmicro/olkit/styles/patterns.css"]
|
|
13
|
+
*
|
|
14
|
+
* ## Vì sao mask, không background-image
|
|
15
|
+
*
|
|
16
|
+
* Mask lấy KÊNH ALPHA của SVG làm khuôn, màu là `background-color:
|
|
17
|
+
* currentColor` — một hoạ tiết dùng được mọi màu (trắng trên navy, brand trên
|
|
18
|
+
* nền sáng) qua class `text-*`, không cần 20 × N bản màu. Độ mờ từng nét trong
|
|
19
|
+
* Figma (stroke-opacity) vẫn giữ vì nằm trong kênh alpha.
|
|
20
|
+
*
|
|
21
|
+
* Bản xuất Figma kèm nền xám #F0F0F0, khung nền tối #101828 và viền #E5E7EB
|
|
22
|
+
* của frame — đã lọc, chỉ giữ nhóm `Type=…`.
|
|
23
|
+
*/
|
|
24
|
+
.ol-pattern {
|
|
25
|
+
background-color: currentColor;
|
|
26
|
+
-webkit-mask-repeat: no-repeat;
|
|
27
|
+
mask-repeat: no-repeat;
|
|
28
|
+
-webkit-mask-position: center;
|
|
29
|
+
mask-position: center;
|
|
30
|
+
-webkit-mask-size: cover;
|
|
31
|
+
mask-size: cover;
|
|
32
|
+
}
|
|
33
|
+
.ol-pattern--fit-contain {
|
|
34
|
+
-webkit-mask-size: contain;
|
|
35
|
+
mask-size: contain;
|
|
36
|
+
}
|
|
37
|
+
/* Lặp ô gốc theo kích thước thật của hình Figma (~1512×776). */
|
|
38
|
+
.ol-pattern--fit-repeat {
|
|
39
|
+
-webkit-mask-repeat: repeat;
|
|
40
|
+
mask-repeat: repeat;
|
|
41
|
+
-webkit-mask-size: auto;
|
|
42
|
+
mask-size: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Figma: Type=Lines */
|
|
46
|
+
.ol-pattern--lines {
|
|
47
|
+
-webkit-mask-image: url('./patterns/lines.svg');
|
|
48
|
+
mask-image: url('./patterns/lines.svg');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Figma: Type=Rounded Lines */
|
|
52
|
+
.ol-pattern--rounded-lines {
|
|
53
|
+
-webkit-mask-image: url('./patterns/rounded-lines.svg');
|
|
54
|
+
mask-image: url('./patterns/rounded-lines.svg');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Figma: Type=Creative */
|
|
58
|
+
.ol-pattern--creative {
|
|
59
|
+
-webkit-mask-image: url('./patterns/creative.svg');
|
|
60
|
+
mask-image: url('./patterns/creative.svg');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Figma: Type=Diamond right */
|
|
64
|
+
.ol-pattern--diamond-right {
|
|
65
|
+
-webkit-mask-image: url('./patterns/diamond-right.svg');
|
|
66
|
+
mask-image: url('./patterns/diamond-right.svg');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Figma: Type=Diamond left */
|
|
70
|
+
.ol-pattern--diamond-left {
|
|
71
|
+
-webkit-mask-image: url('./patterns/diamond-left.svg');
|
|
72
|
+
mask-image: url('./patterns/diamond-left.svg');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Figma: Type=Vertical lines */
|
|
76
|
+
.ol-pattern--vertical-lines {
|
|
77
|
+
-webkit-mask-image: url('./patterns/vertical-lines.svg');
|
|
78
|
+
mask-image: url('./patterns/vertical-lines.svg');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Figma: Type=oblique lines */
|
|
82
|
+
.ol-pattern--oblique-lines {
|
|
83
|
+
-webkit-mask-image: url('./patterns/oblique-lines.svg');
|
|
84
|
+
mask-image: url('./patterns/oblique-lines.svg');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Figma: Type=Dots */
|
|
88
|
+
.ol-pattern--dots {
|
|
89
|
+
-webkit-mask-image: url('./patterns/dots.svg');
|
|
90
|
+
mask-image: url('./patterns/dots.svg');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Figma: Type=Lines modern */
|
|
94
|
+
.ol-pattern--lines-modern {
|
|
95
|
+
-webkit-mask-image: url('./patterns/lines-modern.svg');
|
|
96
|
+
mask-image: url('./patterns/lines-modern.svg');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Figma: Type=Squares */
|
|
100
|
+
.ol-pattern--squares {
|
|
101
|
+
-webkit-mask-image: url('./patterns/squares.svg');
|
|
102
|
+
mask-image: url('./patterns/squares.svg');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Figma: Type=Modern */
|
|
106
|
+
.ol-pattern--modern {
|
|
107
|
+
-webkit-mask-image: url('./patterns/modern.svg');
|
|
108
|
+
mask-image: url('./patterns/modern.svg');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Figma: Type=comb */
|
|
112
|
+
.ol-pattern--comb {
|
|
113
|
+
-webkit-mask-image: url('./patterns/comb.svg');
|
|
114
|
+
mask-image: url('./patterns/comb.svg');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Figma: Type=tech */
|
|
118
|
+
.ol-pattern--tech {
|
|
119
|
+
-webkit-mask-image: url('./patterns/tech.svg');
|
|
120
|
+
mask-image: url('./patterns/tech.svg');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Figma: Type=tech-square */
|
|
124
|
+
.ol-pattern--tech-square {
|
|
125
|
+
-webkit-mask-image: url('./patterns/tech-square.svg');
|
|
126
|
+
mask-image: url('./patterns/tech-square.svg');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Figma: Type=tech-squares */
|
|
130
|
+
.ol-pattern--tech-squares {
|
|
131
|
+
-webkit-mask-image: url('./patterns/tech-squares.svg');
|
|
132
|
+
mask-image: url('./patterns/tech-squares.svg');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Figma: Type=technology */
|
|
136
|
+
.ol-pattern--technology {
|
|
137
|
+
-webkit-mask-image: url('./patterns/technology.svg');
|
|
138
|
+
mask-image: url('./patterns/technology.svg');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Figma: Type=comb-linear */
|
|
142
|
+
.ol-pattern--comb-linear {
|
|
143
|
+
-webkit-mask-image: url('./patterns/comb-linear.svg');
|
|
144
|
+
mask-image: url('./patterns/comb-linear.svg');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Figma: Type=big-comb */
|
|
148
|
+
.ol-pattern--big-comb {
|
|
149
|
+
-webkit-mask-image: url('./patterns/big-comb.svg');
|
|
150
|
+
mask-image: url('./patterns/big-comb.svg');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Figma: Type=lines-oblique */
|
|
154
|
+
.ol-pattern--lines-oblique {
|
|
155
|
+
-webkit-mask-image: url('./patterns/lines-oblique.svg');
|
|
156
|
+
mask-image: url('./patterns/lines-oblique.svg');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Figma: Type=technology-top */
|
|
160
|
+
.ol-pattern--technology-top {
|
|
161
|
+
-webkit-mask-image: url('./patterns/technology-top.svg');
|
|
162
|
+
mask-image: url('./patterns/technology-top.svg');
|
|
163
|
+
}
|