create-flowmo 1.1.0 → 1.1.1
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/package.json +1 -1
- package/skills/outsystems-ui/SKILL.md +125 -9
- package/template/theme/theme.css +15 -1
package/package.json
CHANGED
|
@@ -23,8 +23,10 @@ Build pixel-perfect OutSystems-compatible `.visual.html` prototypes using only t
|
|
|
23
23
|
2. **12-column grid** — use `.columns2` through `.columns6` for responsive layouts. These auto-stack on mobile — do not add custom media queries.
|
|
24
24
|
3. **No external JavaScript** — all interaction patterns are CSS/class-driven.
|
|
25
25
|
4. **Layout is CRITICAL** — every screen MUST use one of the three OutSystems layouts. Pick the right one and use the exact HTML structure from the layout template files. The `.active-screen` wrapper is REQUIRED or utility classes will not resolve. See the **Layouts** section below.
|
|
26
|
-
5. **
|
|
27
|
-
6. **
|
|
26
|
+
5. **Scroll model** — OSUI sets `html { overflow: hidden }`. The `.active-screen` div is the actual scroll container. Your theme.css MUST include `.active-screen { overflow: hidden auto; height: 100vh; }` or the page will not scroll.
|
|
27
|
+
6. **Strip platform IDs** — never include `os-internal-id` or similar platform-generated attributes.
|
|
28
|
+
7. **Widget slots** — use `{{content}}` placeholders in templates where nested widgets would go.
|
|
29
|
+
8. **theme.css is mandatory** — every project has a `theme.css` that loads after `outsystems-ui.css`. Use it for brand colors, custom component styles, and OSUI overrides. See the **Theme Customization** section below.
|
|
28
30
|
|
|
29
31
|
## Layouts
|
|
30
32
|
|
|
@@ -195,6 +197,30 @@ Add `.btn-loading` to the button and include a spinner element inside. This is C
|
|
|
195
197
|
</button>
|
|
196
198
|
```
|
|
197
199
|
|
|
200
|
+
### Button Specificity Warning
|
|
201
|
+
|
|
202
|
+
The `.btn` class sets its own `color` and `background-color` with high specificity. **DO NOT** try to override button colors with OSUI color utilities like `.background-neutral-0` or `.text-primary` — they will be overridden by `.btn` rules and the text will become invisible.
|
|
203
|
+
|
|
204
|
+
**Wrong** (text invisible — white on white):
|
|
205
|
+
```html
|
|
206
|
+
<button class="btn btn-primary background-neutral-0 text-primary">Open Account</button>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Right** — use a named class in `theme.css`:
|
|
210
|
+
```html
|
|
211
|
+
<button class="btn hero-btn-primary">Open Account</button>
|
|
212
|
+
```
|
|
213
|
+
```css
|
|
214
|
+
/* theme.css */
|
|
215
|
+
.hero-btn-primary {
|
|
216
|
+
background: var(--bank-gold) !important;
|
|
217
|
+
color: var(--bank-navy) !important;
|
|
218
|
+
border: 2px solid var(--bank-gold) !important;
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
If you need a button style that doesn't match `.btn-primary`, `.btn-cancel`, `.btn-success`, or `.btn-error`, create a custom class in `theme.css` rather than stacking conflicting utility classes.
|
|
223
|
+
|
|
198
224
|
## Borders
|
|
199
225
|
|
|
200
226
|
### Border Radius
|
|
@@ -334,23 +360,113 @@ Some patterns expose CSS custom properties for fine-tuning. Set these on the pat
|
|
|
334
360
|
| Rating | `--rating-size: 16px` |
|
|
335
361
|
| Scrollable Area | `--scrollable-area-width`, `--scrollable-area-height` |
|
|
336
362
|
|
|
363
|
+
## Theme Customization
|
|
364
|
+
|
|
365
|
+
Every project ships two CSS files: `outsystems-ui.css` (base framework) and `theme.css` (project overrides). The theme file loads second and extends OSUI.
|
|
366
|
+
|
|
367
|
+
### What theme.css MUST contain
|
|
368
|
+
|
|
369
|
+
1. **Scroll model fix** — OSUI expects `.active-screen` to be the scroll container:
|
|
370
|
+
```css
|
|
371
|
+
.active-screen {
|
|
372
|
+
overflow: hidden auto;
|
|
373
|
+
height: 100vh;
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
2. **Brand tokens** — override `:root` CSS variables:
|
|
378
|
+
```css
|
|
379
|
+
:root {
|
|
380
|
+
--color-primary: #1a56db;
|
|
381
|
+
--color-secondary: #0a1628;
|
|
382
|
+
--font-family-base: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
3. **Custom component classes** — for styles that can't be achieved with OSUI utilities alone (e.g. hero buttons, gradient backgrounds, themed footers). Use **BEM naming** (`block__element--modifier`):
|
|
387
|
+
```css
|
|
388
|
+
.hero__btn--primary { ... }
|
|
389
|
+
.hero__btn--outline { ... }
|
|
390
|
+
.footer__link--active { ... }
|
|
391
|
+
.stats__number { ... }
|
|
392
|
+
.card__icon--large { ... }
|
|
393
|
+
```
|
|
394
|
+
BEM keeps custom classes predictable and avoids collisions with OSUI's own class names.
|
|
395
|
+
|
|
396
|
+
### What theme.css should NOT do
|
|
397
|
+
|
|
398
|
+
- Don't redefine OSUI layout structure (`.layout`, `.main`, `.content`, `.header-content`)
|
|
399
|
+
- Don't add `@media` queries — OSUI handles responsiveness
|
|
400
|
+
- Don't override `.btn` base styles — create new named classes instead
|
|
401
|
+
|
|
402
|
+
### Common OSUI specificity traps
|
|
403
|
+
|
|
404
|
+
These OSUI classes set background/color with high specificity that utility classes can't override:
|
|
405
|
+
|
|
406
|
+
| Class | Sets | Don't override with |
|
|
407
|
+
|-------|------|--------------------|
|
|
408
|
+
| `.btn` | `color`, `background-color` | `.text-*`, `.background-*` |
|
|
409
|
+
| `.list-item` | `background-color: white` | Needs `background: transparent !important` in dark contexts |
|
|
410
|
+
| `.card` | `background-color: white` | Needs explicit override for dark backgrounds |
|
|
411
|
+
| `.badge` | `background-color`, `color` | Use `!important` or a custom class |
|
|
412
|
+
|
|
413
|
+
### Icons
|
|
414
|
+
|
|
415
|
+
OSUI does not bundle an icon font. If your screen uses Font Awesome icons (`<i class="fa fa-*">`), you MUST add the CDN link in `<head>`:
|
|
416
|
+
|
|
417
|
+
```html
|
|
418
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
Alternatively, use inline SVGs with the `.icon` class if you want to avoid external dependencies.
|
|
422
|
+
|
|
423
|
+
### Dark section styling
|
|
424
|
+
|
|
425
|
+
When placing content on a dark background (`.background-primary`, `.background-secondary`, or custom dark sections), remember:
|
|
426
|
+
- Use `.text-neutral-0` for white text (headings, paragraphs)
|
|
427
|
+
- Footer `.list-item` elements have `background: white` by default — override with `background: transparent !important`
|
|
428
|
+
- Links default to the primary color — use custom classes for white/light link colors
|
|
429
|
+
- Border colors may be invisible — use `border-color: rgba(255,255,255,0.1)` overrides
|
|
430
|
+
|
|
337
431
|
## Validation
|
|
338
432
|
|
|
339
433
|
After generating a `.visual.html` file, verify:
|
|
340
|
-
1. The root `<div>` has class `
|
|
434
|
+
1. The root `<div>` has class `active-screen` wrapping a `.layout` div
|
|
341
435
|
2. No inline `style=""` attributes exist anywhere in the file
|
|
342
|
-
3. All classes
|
|
343
|
-
4.
|
|
344
|
-
5.
|
|
436
|
+
3. All classes are either OSUI utilities OR custom classes defined in `theme.css` — no undefined classes
|
|
437
|
+
4. Both `outsystems-ui.css` and `theme.css` stylesheet `<link>` tags are present in `<head>`
|
|
438
|
+
5. If Font Awesome icons are used, the FA CDN `<link>` is in `<head>`
|
|
439
|
+
6. No `@media` queries or custom breakpoints were added
|
|
440
|
+
7. `.active-screen` scroll model is handled in `theme.css`
|
|
345
441
|
|
|
346
442
|
If any check fails, fix the issue before presenting the output.
|
|
347
443
|
|
|
444
|
+
### Visual testing with the dev server
|
|
445
|
+
|
|
446
|
+
The project includes a Vite dev server. If `npm install` has already been run, start it with:
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
npm run dev
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
This serves all `.visual.html` files with hot-reload at `http://localhost:5173/`. Use it to:
|
|
453
|
+
- **Open the page in a browser** and take a screenshot to verify the layout renders correctly
|
|
454
|
+
- **Check for invisible text** — buttons or links with white-on-white or same-color text/background
|
|
455
|
+
- **Confirm scrolling works** — the page should scroll within `.active-screen`
|
|
456
|
+
- **Verify icons render** — Font Awesome icons should not be 0×0 invisible boxes
|
|
457
|
+
- **Inspect computed styles** — confirm utility classes resolve as expected against OSUI
|
|
458
|
+
|
|
459
|
+
Do NOT run `npm install` yourself — only use `npm run dev` if `node_modules` already exists.
|
|
460
|
+
|
|
348
461
|
## Gotchas
|
|
349
462
|
|
|
350
|
-
- `.active-screen`
|
|
463
|
+
- `.active-screen` is **REQUIRED** as the outermost wrapper. Without it, utility classes and CSS variables will NOT resolve. It also serves as the **scroll container** — OSUI sets `html { overflow: hidden }` so `.active-screen` must have `overflow: hidden auto; height: 100vh` (set this in `theme.css`).
|
|
464
|
+
- **Button + color utilities don't mix** — `.btn` overrides `color` and `background-color` at high specificity. Stacking `.btn .background-neutral-0 .text-primary` will produce invisible text (white on white). Create custom button classes in `theme.css` instead.
|
|
465
|
+
- **`.list-item` has white background** — In dark-background sections (footer, sidebar), list items will show as white rectangles. Override with `background: transparent !important` in `theme.css`.
|
|
466
|
+
- **Font Awesome is not bundled** — If using `<i class="fa fa-exchange">` style icons, add the FA 4.7 CDN link to `<head>` or the icons will be invisible (0×0 size).
|
|
351
467
|
- OutSystems pattern previews render inside iframes — CSS resolves against the OSUI framework, not browser defaults. Your `.visual.html` must link the OSUI stylesheet.
|
|
352
|
-
- **Never mix** inline `style=""` attributes with utility classes.
|
|
468
|
+
- **Never mix** inline `style=""` attributes with utility classes. Always prefer utility classes.
|
|
353
469
|
- `.columns*` patterns auto-stack on mobile breakpoints. Do NOT add custom `@media` queries to override this behavior.
|
|
354
470
|
- Button loading state is purely CSS (`.btn-loading` + spinner element), not a JavaScript toggle.
|
|
355
471
|
- Use `{{content}}` placeholders in component templates to indicate where nested child widgets go.
|
|
356
|
-
- Always
|
|
472
|
+
- Always generate BOTH the `.visual.html` AND corresponding `theme.css` styles together. A screen without proper theme styles will look broken.
|
package/template/theme/theme.css
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
This file loads after outsystems-ui.css.
|
|
4
4
|
──────────────────────────────────────────────────────── */
|
|
5
5
|
|
|
6
|
+
/* ── 1. OSUI scroll model ────────────────────────────
|
|
7
|
+
OSUI sets html { overflow: hidden }. The .active-screen
|
|
8
|
+
div is the actual scroll container for the page.
|
|
9
|
+
WITHOUT this rule, pages will not scroll.
|
|
10
|
+
──────────────────────────────────────────────────────── */
|
|
11
|
+
.active-screen {
|
|
12
|
+
overflow: hidden auto;
|
|
13
|
+
height: 100vh;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ── 2. Brand tokens ─────────────────────────────────── */
|
|
6
17
|
:root {
|
|
7
18
|
/* Brand colors – change these to match your app */
|
|
8
19
|
--color-primary: #2979ff;
|
|
@@ -16,4 +27,7 @@
|
|
|
16
27
|
--font-size-base: 14px;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
|
-
/*
|
|
30
|
+
/* ── 3. Custom styles ────────────────────────────────── */
|
|
31
|
+
/* Add custom component classes here.
|
|
32
|
+
Use named classes for button variants, dark-section overrides,
|
|
33
|
+
gradient backgrounds, etc. Keep OSUI utilities for layout/spacing. */
|