@se-studio/project-build 1.0.51 → 1.0.53
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/CHANGELOG.md +12 -0
- package/dist/management/check-target.d.ts +2 -0
- package/dist/management/check-target.d.ts.map +1 -0
- package/dist/management/check-target.js +40 -0
- package/dist/management/check-target.js.map +1 -0
- package/dist/management/count-brightline.d.ts +2 -0
- package/dist/management/count-brightline.d.ts.map +1 -0
- package/dist/management/count-brightline.js +37 -0
- package/dist/management/count-brightline.js.map +1 -0
- package/dist/management/cross-check-migration.d.ts +2 -0
- package/dist/management/cross-check-migration.d.ts.map +1 -0
- package/dist/management/cross-check-migration.js +212 -0
- package/dist/management/cross-check-migration.js.map +1 -0
- package/dist/management/discovery-brightlife.d.ts +2 -0
- package/dist/management/discovery-brightlife.d.ts.map +1 -0
- package/dist/management/discovery-brightlife.js +78 -0
- package/dist/management/discovery-brightlife.js.map +1 -0
- package/dist/management/discovery-brightline.d.ts +2 -0
- package/dist/management/discovery-brightline.d.ts.map +1 -0
- package/dist/management/discovery-brightline.js +68 -0
- package/dist/management/discovery-brightline.js.map +1 -0
- package/dist/management/inspect-target.d.ts +2 -0
- package/dist/management/inspect-target.d.ts.map +1 -0
- package/dist/management/inspect-target.js +48 -0
- package/dist/management/inspect-target.js.map +1 -0
- package/dist/management/migrate-brightlife.d.ts +2 -0
- package/dist/management/migrate-brightlife.d.ts.map +1 -0
- package/dist/management/migrate-brightlife.js +475 -0
- package/dist/management/migrate-brightlife.js.map +1 -0
- package/dist/management/migrate-brightline.d.ts +2 -0
- package/dist/management/migrate-brightline.d.ts.map +1 -0
- package/dist/management/migrate-brightline.js +1085 -0
- package/dist/management/migrate-brightline.js.map +1 -0
- package/dist/management/sync-skills.d.ts +2 -0
- package/dist/management/sync-skills.d.ts.map +1 -0
- package/dist/management/sync-skills.js +46 -0
- package/dist/management/sync-skills.js.map +1 -0
- package/dist/seskills.d.ts +9 -0
- package/dist/seskills.d.ts.map +1 -0
- package/dist/seskills.js +25 -0
- package/dist/seskills.js.map +1 -0
- package/package.json +7 -6
- package/skills/se-marketing-sites/create-collection/SKILL.md +283 -0
- package/skills/se-marketing-sites/create-component/SKILL.md +245 -0
- package/skills/se-marketing-sites/create-page/SKILL.md +134 -0
- package/skills/se-marketing-sites/handling-media/SKILL.md +118 -0
- package/skills/se-marketing-sites/register-cms-features/SKILL.md +95 -0
- package/skills/se-marketing-sites/styling-system/SKILL.md +118 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: styling-system
|
|
3
|
+
description: Reference guide for the marketing site styling system, including typography, colors, grids, and RTF classes.
|
|
4
|
+
license: Private
|
|
5
|
+
metadata:
|
|
6
|
+
author: se-core-product
|
|
7
|
+
version: "1.1.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Styling System
|
|
11
|
+
|
|
12
|
+
This project uses a customized Tailwind CSS setup where the configuration is driven by `tailwind.config.json` in each app. This JSON file acts as the source of truth for design tokens, including colors, typography, spacing, and breakpoints.
|
|
13
|
+
|
|
14
|
+
## Configuration Source
|
|
15
|
+
|
|
16
|
+
The `tailwind.config.json` file in your app's root directory defines the following:
|
|
17
|
+
|
|
18
|
+
* **`colorOptions`**: Defines the project's color palette.
|
|
19
|
+
* **`fontTable`**: Defines typography styles, responsive scaling, and font families.
|
|
20
|
+
* **`sizes`**: Defines breakpoints, grid columns, gaps, and margins.
|
|
21
|
+
|
|
22
|
+
These configurations are processed by the build system to generate utility classes and TypeScript helpers.
|
|
23
|
+
|
|
24
|
+
## Typography
|
|
25
|
+
|
|
26
|
+
Typography utility classes (e.g., `h1`, `h2`, `p1`, `p2`) are automatically generated from the `fontTable` in `tailwind.config.json`.
|
|
27
|
+
|
|
28
|
+
### generated Utilities
|
|
29
|
+
|
|
30
|
+
Classes are generated for each key in `fontTable.styles`. Common keys include:
|
|
31
|
+
|
|
32
|
+
* **Headings**: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
|
|
33
|
+
* **Body**: `p1`, `p2`, `p3`, `p4`
|
|
34
|
+
* **Special**: `quote`, `button`, `nav`, etc. (varies by project)
|
|
35
|
+
|
|
36
|
+
Styles are responsive and scale automatically based on the breakpoints defined in the config (e.g., `laptop`, `desktop`).
|
|
37
|
+
|
|
38
|
+
### Best Practice: Dynamic Sizing
|
|
39
|
+
|
|
40
|
+
Use `getSizingInformation(index)` to dynamically assign the correct heading class based on the component's position on the page or the CMS configuration.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
// Example usage in a component renderer
|
|
44
|
+
const { Element, sizingInformation } = getSizingInformation(size, index);
|
|
45
|
+
<Element className={sizingInformation.h1}>{title}</Element>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Colors
|
|
49
|
+
|
|
50
|
+
Colors are defined in `colorOptions` within `tailwind.config.json`. The build system generates TypeScript helpers in `@/generated/colors` to access these colors safely.
|
|
51
|
+
|
|
52
|
+
### Helper Functions
|
|
53
|
+
|
|
54
|
+
1. **`lookupColourString(colorName, property)`**:
|
|
55
|
+
Get a single class for a specific property.
|
|
56
|
+
```typescript
|
|
57
|
+
// Returns "text-primary-blue" (if 'Primary Blue' exists in config)
|
|
58
|
+
lookupColourString('Primary Blue', 'text')
|
|
59
|
+
// Returns "bg-light-gray" (if 'Light Gray' exists in config)
|
|
60
|
+
lookupColourString('Light Gray', 'bg')
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. **`lookupColourClassNames(bgColor, textColor)`**:
|
|
64
|
+
Get background AND text classes, handling automatic contrast if text color is omitted (based on `colorOpposites` in config).
|
|
65
|
+
```typescript
|
|
66
|
+
// Returns "bg-primary-blue text-white" (if White is opposite of Primary Blue)
|
|
67
|
+
lookupColourClassNames('Primary Blue')
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Grid System
|
|
71
|
+
|
|
72
|
+
The grid system is defined in the `sizes` object of `tailwind.config.json`. It specifies the number of columns, margins, and gaps for each breakpoint.
|
|
73
|
+
|
|
74
|
+
### Standard Breakpoints
|
|
75
|
+
|
|
76
|
+
While configurable, most projects use:
|
|
77
|
+
* `mobile`: Default (0px+)
|
|
78
|
+
* `tablet`: ~768px+
|
|
79
|
+
* `laptop`: ~1024px+
|
|
80
|
+
* `desktop`: ~1440px+
|
|
81
|
+
|
|
82
|
+
### Layout Helpers
|
|
83
|
+
|
|
84
|
+
Common layout patterns using Tailwind grid utilities:
|
|
85
|
+
|
|
86
|
+
* **Full Width**: `col-span-full`
|
|
87
|
+
* **Centered Content**: `col-span-full laptop:col-start-2 laptop:col-span-10` (assuming 12 columns on laptop)
|
|
88
|
+
* **Split 50/50**:
|
|
89
|
+
* Left: `col-span-full laptop:col-span-6`
|
|
90
|
+
* Right: `col-span-full laptop:col-span-6`
|
|
91
|
+
|
|
92
|
+
## Rich Text (RTF) Classes
|
|
93
|
+
|
|
94
|
+
Rich text styling is handled via custom utility classes defined in `src/app/globals.css`. These classes map raw HTML elements (from the CMS rich text field) to the project's typography utilities.
|
|
95
|
+
|
|
96
|
+
Common conventions for RTF classes (check your specific `globals.css`):
|
|
97
|
+
|
|
98
|
+
* **`.rtf-standard` / `.content-rich-text`**: Default styling for body content.
|
|
99
|
+
* **`.rtf-legal`**: Styling for terms and conditions (often smaller text, decimal lists).
|
|
100
|
+
* **`.rtf-article`**: Editorial styling (often larger text, specific spacing).
|
|
101
|
+
* **`.rtf-core`**: Minimal styling reset.
|
|
102
|
+
|
|
103
|
+
**Usage**:
|
|
104
|
+
Wrap the `RtfOrString` component with the appropriate class:
|
|
105
|
+
```tsx
|
|
106
|
+
<div className="rtf-standard">
|
|
107
|
+
<RtfOrString data={richTextData} />
|
|
108
|
+
</div>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Global Styles
|
|
112
|
+
|
|
113
|
+
Project-specific global styles, animations, and custom utility classes are located in `src/app/globals.css`. This file imports the generated Tailwind CSS and defines:
|
|
114
|
+
|
|
115
|
+
* Root variables (if any)
|
|
116
|
+
* Animation keyframes
|
|
117
|
+
* Custom component classes (e.g., `.btn-primary`)
|
|
118
|
+
* Rich Text Formatting classes
|