@innovastudio/contentbuilder 1.5.185 → 1.5.186

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.
@@ -6569,7 +6569,9 @@ class Util {
6569
6569
  row = this.rowSelected();
6570
6570
  }
6571
6571
  if (!row) return;
6572
- this.colTool = row.querySelector('.is-col-tool');
6572
+
6573
+ // this.colTool = row.querySelector('.is-col-tool');
6574
+ this.colTool = row.querySelector(':scope > .is-col-tool');
6573
6575
  if (!this.colTool) return; // when drag block as a new section
6574
6576
 
6575
6577
  if (!col.parentNode) {
@@ -51420,7 +51422,8 @@ class SettingsUIGenerator {
51420
51422
  this.builder.openColorPicker(input.value, color => {
51421
51423
  input.value = color;
51422
51424
  colorBtn.style.backgroundColor = color;
51423
- input.dispatchEvent(new Event('change', {
51425
+ // input.dispatchEvent(new Event('change', { bubbles: true }));
51426
+ input.dispatchEvent(new Event('input', {
51424
51427
  bubbles: true
51425
51428
  }));
51426
51429
  }, colorBtn);
@@ -54027,7 +54030,9 @@ class RowTool {
54027
54030
  this.builder.backwardCompatible();
54028
54031
  }
54029
54032
  const btnCellAdd = coltool.querySelector('.cell-add');
54030
- if (btnCellAdd) dom.addEventListener(btnCellAdd, 'click', () => {
54033
+ if (btnCellAdd) dom.addEventListener(btnCellAdd, 'click', e => {
54034
+ e.preventDefault();
54035
+ e.stopImmediatePropagation();
54031
54036
  let cell = util.cellSelected();
54032
54037
  if (!cell) return;
54033
54038
  const viewportHeight = window.innerHeight;
@@ -54097,7 +54102,9 @@ class RowTool {
54097
54102
  }
54098
54103
  });
54099
54104
  const btnCellMore = coltool.querySelector('.cell-more');
54100
- if (btnCellMore) dom.addEventListener(btnCellMore, 'click', () => {
54105
+ if (btnCellMore) dom.addEventListener(btnCellMore, 'click', e => {
54106
+ e.preventDefault();
54107
+ e.stopImmediatePropagation();
54101
54108
  let cell = util.cellSelected();
54102
54109
  if (!cell) return;
54103
54110
  const viewportHeight = window.innerHeight;
@@ -54271,7 +54278,9 @@ class RowTool {
54271
54278
  this.showGridEditor();
54272
54279
  });
54273
54280
  const btnMore = rowtool.querySelector('.row-more');
54274
- if (btnMore) dom.addEventListener(btnMore, 'click', () => {
54281
+ if (btnMore) dom.addEventListener(btnMore, 'click', e => {
54282
+ e.preventDefault();
54283
+ e.stopImmediatePropagation();
54275
54284
  let row;
54276
54285
  let cell = util.cellSelected();
54277
54286
  if (cell) {
@@ -55288,7 +55297,9 @@ class RowAddTool {
55288
55297
  });
55289
55298
  }
55290
55299
  let btnRowAdd = rowaddtool.querySelector('button');
55291
- dom.addEventListener(btnRowAdd, 'click', () => {
55300
+ dom.addEventListener(btnRowAdd, 'click', e => {
55301
+ e.preventDefault();
55302
+ e.stopImmediatePropagation();
55292
55303
  const quickadd = renderQuickAdd(this.builder);
55293
55304
  let tabs = quickadd.querySelector('.is-pop-tabs');
55294
55305
  tabs.style.display = 'none';
@@ -57998,7 +58009,8 @@ class ColumnTool {
57998
58009
  }
57999
58010
  }
58000
58011
  click(col) {
58001
- this.columnTool = col.parentNode.querySelector('.is-col-tool');
58012
+ // this.columnTool = col.parentNode.querySelector('.is-col-tool');
58013
+ this.columnTool = col.parentNode.querySelector(':scope > .is-col-tool');
58002
58014
  if (!this.columnTool) return;
58003
58015
  this.columnTool.style.left = col.offsetLeft + 'px';
58004
58016
  this.columnTool.style.top = col.offsetTop + 'px';
@@ -88091,6 +88103,9 @@ class CodeChat {
88091
88103
  this.systemModel = this.builder.systemModel;
88092
88104
  }
88093
88105
  this.codeModels = [{
88106
+ id: 'google/gemini-3-pro-preview',
88107
+ label: 'Google Gemini 3 Pro Preview'
88108
+ }, {
88094
88109
  id: 'google/gemini-2.5-flash',
88095
88110
  label: 'Google Gemini 2.5 Flash'
88096
88111
  }, {
@@ -88153,10 +88168,7 @@ class CodeChat {
88153
88168
  }, {
88154
88169
  id: 'minimax/minimax-m2',
88155
88170
  label: 'MiniMax M2'
88156
- }
88157
- // { id: 'kwaipilot/kat-coder-pro:free', label: 'KAT Coder Pro (Free)' },
88158
- ];
88159
-
88171
+ }];
88160
88172
  if (this.builder.codeModels) {
88161
88173
  this.codeModels = this.builder.codeModels;
88162
88174
  }
@@ -88222,6 +88234,13 @@ class CodeChat {
88222
88234
  this.chatModels = this.builder.chatModels;
88223
88235
  }
88224
88236
  this.imageModels = [{
88237
+ id: 'fal-ai/nano-banana-pro',
88238
+ label: 'Nano Banana Pro',
88239
+ sizes: [],
88240
+ // no size options
88241
+ // sizes: ['21:9', '16:9', '3:2', '4:3', '5:4', '1:1', '4:5', '3:4', '2:3', '9:16'],
88242
+ output_format: 'jpeg'
88243
+ }, {
88225
88244
  id: 'fal-ai/nano-banana',
88226
88245
  label: 'Nano Banana',
88227
88246
  sizes: [],
@@ -89100,7 +89119,7 @@ class CodeChat {
89100
89119
  ${out('Code Generation Model')}
89101
89120
  </label>
89102
89121
  <p class="setting-description">
89103
- ${out('Select the AI model used for generating and modifying HTML/CSS code')}
89122
+ ${out('Select the AI model used for generating and modifying HTML code')}
89104
89123
  </p>
89105
89124
  <select id="codeModelSelect" aria-describedby="codeModelDesc">
89106
89125
  </select>
@@ -90096,6 +90115,9 @@ ${this.builder.html()}
90096
90115
  \`\`\`
90097
90116
 
90098
90117
  TASK: ${task.description}
90118
+
90119
+ IMPORTANT: Follow the Best Practices in Content framework.
90120
+
90099
90121
  ${imageContext}
90100
90122
  ${chatContext}
90101
90123
 
@@ -90332,7 +90354,7 @@ ${this.builder.html()}
90332
90354
  copyButton.classList.remove('copied');
90333
90355
  }, 2000);
90334
90356
  }).catch(err => {
90335
- console.error('Failed to copy:', err);
90357
+ console.error(out('Failed to copy:'), err);
90336
90358
  });
90337
90359
  });
90338
90360
  return rawText;
@@ -90553,551 +90575,691 @@ ${this.builder.html()}
90553
90575
  }
90554
90576
  }
90555
90577
 
90556
- const contextBoxFramework = `
90557
- # Box Framework
90578
+ const contextContentFramework = `
90558
90579
 
90559
- The Box Framework handles page structure and layout. It works with the Content.css Framework to create complete, responsive designs.
90580
+ # Content.css Framework
90560
90581
 
90561
- ## Architecture Overview
90582
+ ## Grid System
90562
90583
 
90563
- .is-section (page section)
90564
- └── .is-box (layout box)
90565
- ├── .is-overlay (background layer)
90566
- │ └── .is-overlay-bg (background image/color)
90567
- └── .is-container (content area)
90568
- └── .row > .column (content from Content.css)
90584
+ All content must be wrapped in rows and columns.
90569
90585
 
90570
- ---
90586
+ <div class="row">
90587
+ <div class="column">
90588
+ <!-- Content here -->
90589
+ </div>
90590
+ </div>
90591
+ <div class="row">
90592
+ <div class="column">
90593
+ <!-- Content here -->
90594
+ </div>
90595
+ <div class="column">
90596
+ <!-- Content here -->
90597
+ </div>
90598
+ </div>
90571
90599
 
90572
- ## Sections
90600
+ > **Important:** Never place content directly under a container. Always use row → column structure.
90573
90601
 
90574
- Sections are full-width page divisions. Each section is a '<div class="is-section">'.
90602
+ ### Inline Width Style
90575
90603
 
90576
- ### Basic Section
90604
+ Just use: <div class="column" style="width: 52%; flex: 0 0 auto;">
90577
90605
 
90578
- <div class="is-section type-system-ui">
90579
- <!-- Content goes here -->
90606
+ <div class="row">
90607
+ <div class="column" style="width: 52%; flex: 0 0 auto;">
90608
+ <div class="column">
90580
90609
  </div>
90581
90610
 
90582
- > **Important:** Always include 'type-system-ui' class on sections for default typography.
90583
-
90584
- ### Section Height
90611
+ **If columns should be equal width:**
90585
90612
 
90586
- Control minimum section height with viewport-based classes:
90613
+ Just use: <div class="column"> for each column.
90587
90614
 
90588
- | Class | Height | Use Case |
90589
- |-------|--------|----------|
90590
- | '.is-section-50' | 50vh | Half screen sections |
90591
- | '.is-section-60' | 60vh | Medium sections |
90592
- | '.is-section-80' | 80vh | Tall sections |
90593
- | '.is-section-100' | 100vh | Full screen hero sections |
90594
- | '.is-section-auto' | Auto | Content-based height |
90615
+ <div class="row">
90616
+ <div class="column">
90617
+ <div class="column">
90618
+ </div
90595
90619
 
90596
- **Example:**
90620
+ > **Tip:** On mobile (< 760px), columns automatically stack full-width for better responsiveness.
90597
90621
 
90598
- <div class="is-section type-system-ui is-section-100">
90599
- <!-- Full screen hero -->
90600
- </div>
90622
+ ### Column Gap
90601
90623
 
90602
- > **Available heights:** 10, 15, 20, 25, 30, 40, 50, 60, 70, 75, 80, 85, 90, 100, auto
90624
+ Rules:
90603
90625
 
90604
- ---
90626
+ - **DO NOT add gap by default.** Columns have default padding (1rem left/right) which handles most cases.
90605
90627
 
90606
- ## Boxes
90628
+ - **Use gap ONLY when the design specifically needs extra breathing room.**
90607
90629
 
90608
- Boxes are layout divisions within sections. A section can contain one or multiple boxes.
90630
+ - ***ALWAYS use inline style for gap, NEVER use gap utility classes (gap-4, gap-6, etc.).***
90609
90631
 
90610
- ### Single Box Section
90632
+ When gap is needed, use these guidelines based on content type:
90611
90633
 
90612
- When a section has only one box (full-width), combine classes:
90634
+ **Image galleries/portfolio grids: gap:20px (maximum)**
90613
90635
 
90614
- <div class="is-section is-box type-system-ui is-section-100">
90615
- <div class="is-overlay">
90616
- <!-- Background -->
90617
- </div>
90618
- <div class="is-container">
90619
- <!-- Content -->
90620
- </div>
90636
+ <div class="row" style="gap:20px">
90637
+ <div class="column pb-6"><img...></div>
90638
+ <div class="column pb-6"><img...></div>
90639
+ <div class="column pb-6"><img...></div>
90621
90640
  </div>
90622
90641
 
90623
- ### Multi-Box Section
90624
-
90625
- When a section has multiple boxes (split layout):
90642
+ **Image + text layouts (2 columns): gap:30px (maximum)**
90626
90643
 
90627
- <div class="is-section type-system-ui is-section-100">
90628
- <div class="is-box is-box-5">
90629
- <div class="is-overlay">
90630
- <!-- Background for left box -->
90631
- </div>
90632
- <div class="is-container">
90633
- <!-- Left content -->
90634
- </div>
90644
+ <div class="row" style="gap:20px">
90645
+ <div class="column" style="width: 55%; flex: 0 0 auto;">
90646
+ <img...>
90635
90647
  </div>
90636
- <div class="is-box is-box-7">
90637
- <div class="is-overlay">
90638
- <!-- Background for right box -->
90639
- </div>
90640
- <div class="is-container">
90641
- <!-- Right content -->
90642
- </div>
90648
+ <div class="column flex flex-col justify-center">
90649
+ <h3>Title</h3>
90650
+ <p>Details...</p>
90643
90651
  </div>
90644
90652
  </div>
90645
90653
 
90646
- ### Box Width Classes
90654
+ **Default rule: No gap unless there's a specific design reason. When in doubt, omit gap.**
90647
90655
 
90648
- Boxes use a 12-column grid system:
90649
90656
 
90650
- | Class | Width | Common Use |
90651
- |-------|-------|------------|
90652
- | '.is-box-4' | 33.33% | Three columns |
90653
- | '.is-box-5' | 41.67% | 40/60 split |
90654
- | '.is-box-6' | 50% | Half/half split |
90655
- | '.is-box-7' | 58.33% | 60/40 split |
90656
- | '.is-box-8' | 66.67% | Two-thirds |
90657
- | '.is-box-12' | 100% | Full width |
90657
+ ### CRITICAL: When using gap with custom column widths:
90658
90658
 
90659
- > **Available widths:** 1-12 (increments of 8.33%)
90659
+ **Gap takes up space**, so column widths + gap must not exceed 100%.
90660
90660
 
90661
- > **Mobile behavior:** On screens < 970px, all boxes stack to 100% width automatically.
90661
+ **Best practice: Use only ONE custom width, let other column(s) flex:**
90662
90662
 
90663
- ---
90663
+ CORRECT (one width + gap):
90664
+ <div class="row" style="gap:20px">
90665
+ <div class="column" style="width: 55%; flex: 0 0 auto;">
90666
+ <img...>
90667
+ </div>
90668
+ <div class="column">
90669
+ <!-- This column flexes to fill remaining space -->
90670
+ <h3>Content...</h3>
90671
+ </div>
90672
+ </div>
90664
90673
 
90665
- ## Overlay (Backgrounds)
90674
+ INCORRECT (widths don't account for gap):
90675
+ <div class="row" style="gap:20px">
90676
+ <div class="column" style="width: 38%; flex: 0 0 auto;">...</div> ❌
90677
+ <div class="column" style="width: 62%; flex: 0 0 auto;">...</div> ❌
90678
+ <!-- 38% + 62% + 20px gap = overflow! -->
90679
+ </div>
90666
90680
 
90667
- The overlay system provides background images and colors behind content.
90681
+ ### Font Sizes
90668
90682
 
90669
- ### Background Color Only
90683
+ Use 'size-*' classes for precise font sizing.
90670
90684
 
90671
- <div class="is-overlay" style="background-color: rgb(245, 245, 245);">
90672
- </div>
90673
- ` + `
90674
- ### Background Image
90685
+ | Class | Size | Common Use |
90686
+ |-------|------|------------|
90687
+ | '.size-12' | 12px | Small labels, captions |
90688
+ | '.size-14' | 14px | Labels, meta info |
90689
+ | '.size-16' | 16px | Body text |
90690
+ | '.size-18' | 18px | Large body text |
90691
+ | '.size-20' | 20px | Small headings |
90692
+ | '.size-24' | 24px | Subheadings |
90693
+ | '.size-32' | 32px | Medium headings |
90694
+ | '.size-42' | 42px | Large headings |
90695
+ | '.size-48' | 48px | Hero headings |
90696
+ | '.size-60' | 60px | Extra large headings |
90697
+ | '.size-72' | 72px | Display text, stats |
90698
+ | '.size-96' | 96px | Extra large display |
90675
90699
 
90676
- <div class="is-overlay">
90677
- <div class="is-overlay-bg"
90678
- style="background-image: url('image.jpg');
90679
- background-position: 50% 60%;">
90680
- </div>
90681
- </div>
90700
+ > **Available sizes:** 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100... up to 400
90682
90701
 
90683
- ### Background Image with Color Overlay
90702
+ ### Font Weights
90684
90703
 
90685
- <div class="is-overlay" style="background-color: rgb(225, 225, 225);">
90686
- <div class="is-overlay-bg"
90687
- style="background-image: url('image.jpg');
90688
- background-position: 50% 60%;
90689
- opacity: 0.7;">
90690
- </div>
90691
- </div>
90704
+ Classes: font-light, font-normal, font-medium, font-semibold, font-bold
90692
90705
 
90693
- ### Dark Overlay on Image
90706
+ ### Letter Spacing (Tracking)
90694
90707
 
90695
- <div class="is-overlay">
90696
- <div class="is-overlay-bg"
90697
- style="background-image: url('image.jpg');
90698
- background-position: 50% 60%;">
90699
- <div class="is-overlay-color opacity-12"></div>
90700
- </div>
90701
- </div>
90708
+ Classes: tracking-tight, tracking-normal, tracking-wide, tracking-wider, tracking-150 (ideal for uppercase labels)
90702
90709
 
90703
- > **Tip:** Use 'background-position' to control image focal point. Format: 'horizontal% vertical%'
90710
+ ### Line Height (Leading)
90704
90711
 
90705
- ---
90712
+ Classes: leading-none, leading-12, leading-13, leading-14, leading-15, leading-16, leading-17, leading-18
90706
90713
 
90707
- ## Container (Content Area)
90714
+ > **Best Practice:** Use 'leading-17' or 'leading-18' for body text. Use 'leading-12' or 'leading-13' for headings.
90708
90715
 
90709
- Containers hold the actual content and control its width and positioning.
90716
+ ### Text Utilities
90710
90717
 
90711
- ### Basic Container
90718
+ Classes: uppercase, lowercase, capitalize, text-center, text-left, text-right
90712
90719
 
90713
- <div class="is-container">
90714
- <div class="row">
90715
- <div class="column">
90716
- <!-- Your content from Content.css framework -->
90717
- </div>
90718
- </div>
90719
- </div>
90720
+ When creating centered (or left/right aligned) text sections: Apply alignment classes directly to text elements, NOT to wrapper divs.
90720
90721
 
90721
- > **Important:** Always wrap content inside container using the row → column structure from Content.css.
90722
+ CORRECT (alignment on elements):
90722
90723
 
90723
- ### Container Width
90724
+ <div class="column">
90725
+ <p class="size-12 text-gray-400 pb-4 text-center">Label</p>
90726
+ <h2 class="size-48 leading-12 pb-6 text-center">Heading</h2>
90727
+ <p class="size-17 leading-18 text-gray-600 text-center">Description...</p>
90728
+ </div>
90724
90729
 
90725
- Control maximum content width:
90730
+ INCORRECT (wrapper div for alignment):
90726
90731
 
90727
- <div class="is-container is-content-1200">
90728
- <!-- Content max-width: 1200px -->
90732
+ <div class="column">
90733
+ <div class="text-center"> ❌
90734
+ <p class="size-12 text-gray-400 pb-4">Label</p>
90735
+ <h2 class="size-48 leading-12 pb-6">Heading</h2>
90736
+ <p class="size-17 leading-18 text-gray-600">Description...</p>
90737
+ </div>
90729
90738
  </div>
90730
90739
 
90731
- **Common widths:**
90740
+ Keep the content structure in column flat.
90732
90741
 
90733
- | Class | Max Width | Use Case |
90734
- |-------|-----------|----------|
90735
- | '.is-content-760' | 760px | Narrow text content |
90736
- | '.is-content-980' | 980px | Default (if no class) |
90737
- | '.is-content-1200' | 1200px | Standard wide |
90738
- | '.is-content-1400' | 1400px | Extra wide |
90739
- | '.is-content-1740' | 1740px | Ultra wide |
90742
+ ### Padding
90740
90743
 
90741
- > **Available widths:** 560, 580, 600... 1800 (increments of 20px)
90744
+ Classes: p-0, p-2, p-3, p-4, p-6, p-8, p-10, p-12
90742
90745
 
90743
- ### Horizontal Position
90746
+ > **Available values:** 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20
90744
90747
 
90745
- Position container left, center (default), or right:
90748
+ **Example: Card with padding**
90746
90749
 
90747
- <!-- Left aligned -->
90748
- <div class="is-container is-content-left">
90750
+ <!-- Example: Card with padding -->
90751
+ <div class="p-12 bg-gray-50">
90752
+ <p class="size-18 pb-4">Card content</p>
90753
+ <p class="size-14 text-gray-600">Description</p>
90754
+ </div>
90749
90755
 
90750
- <!-- Centered (default) -->
90751
- <div class="is-container">
90756
+ ### Directional Padding
90752
90757
 
90753
- <!-- Right aligned -->
90754
- <div class="is-container is-content-right">
90758
+ Classes: px-4, py-4, pt-4, pb-4, pl-4, pr-4
90755
90759
 
90756
- > **Mobile behavior:** On screens < 760px, all containers center automatically.
90760
+ ### Spacer (Vertical Spacing)
90757
90761
 
90758
- ### Vertical Position
90762
+ | Class | Description |
90763
+ |-------|-------------|
90764
+ | '.spacer.height-20' | 20px vertical space |
90765
+ | '.spacer.height-40' | 40px vertical space |
90766
+ | '.spacer.height-60' | 60px vertical space |
90767
+ | '.spacer.height-80' | 80px vertical space |
90768
+ | '.spacer.height-100' | 100px vertical space |
90769
+ | '.spacer.height-120' | 120px vertical space |
90759
90770
 
90760
- Position container top, middle (default), or bottom within the box:
90771
+ **Example: Adding space between sections**
90761
90772
 
90762
- <!-- Top aligned -->
90763
- <div class="is-section is-box type-system-ui is-content-top">
90764
- <div class="is-container">
90773
+ <!-- Example: Adding space between sections -->
90774
+ <div class="row">
90775
+ <div class="column">
90776
+ <h2>Section Title</h2>
90777
+ </div>
90778
+ </div>
90779
+ <div class="row">
90780
+ <div class="column">
90781
+ <div class="spacer height-60"></div>
90782
+ </div>
90783
+ </div>
90784
+ <div class="row">
90785
+ <div class="column">
90786
+ <p>Section content...</p>
90787
+ </div>
90788
+ </div>
90765
90789
 
90766
- <!-- Middle aligned (default) -->
90767
- <div class="is-section is-box type-system-ui">
90768
- <div class="is-container">
90790
+ > **Available heights:** 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300
90769
90791
 
90770
- <!-- Bottom aligned -->
90771
- <div class="is-section is-box type-system-ui is-content-bottom">
90772
- <div class="is-container">
90792
+ ---
90773
90793
  ` + `
90774
- ### Fine-Tune Vertical Position
90775
-
90776
- Adjust vertical spacing with edge classes:
90777
-
90778
- <!-- Push content closer to top edge -->
90779
- <div class="is-section is-box type-system-ui is-content-top edge-y-0">
90780
90794
 
90781
- <!-- Push content away from bottom edge -->
90782
- <div class="is-section is-box type-system-ui is-content-bottom edge-y-4">
90795
+ ## Buttons
90783
90796
 
90784
- **Edge values:**
90797
+ Buttons are portable and must be wrapped in a div inside a column. All styling uses content.css classes with inline styles for colors.
90785
90798
 
90786
- | Class | Effect |
90787
- |-------|--------|
90788
- | 'edge-y--5' to 'edge-y--1' | Pull inward (negative space) |
90789
- | 'edge-y-0' | Flush to edge |
90790
- | 'edge-y-1' to 'edge-y-5' | Push outward |
90799
+ ### Button Structure
90791
90800
 
90792
- > **Default spacing:** Without edge classes, containers have 6.5vh margin from top/bottom.
90801
+ All buttons must be wrapped in a 'div' (or use 'space-x-2' for button groups):
90793
90802
 
90794
- ### Container Vertical Padding
90795
-
90796
- Add internal spacing inside containers:
90803
+ <div class="row">
90804
+ <div class="column">
90805
+ <div>
90806
+ <a href="#" role="button" class="...">
90807
+ Button Text
90808
+ </a>
90809
+ </div>
90810
+ </div>
90811
+ </div>
90797
90812
 
90798
- <div class="is-container content-py-60">
90799
- <!-- 60px padding top and bottom -->
90813
+ ### Base Button Classes
90814
+
90815
+ Every button includes these base classes:
90816
+
90817
+ transition-all inline-block whitespace-nowrap cursor-pointer
90818
+ border-2 border-solid mt-2 mb-1 font-normal tracking-normal rounded-full
90819
+
90820
+ ### Button Sizes
90821
+
90822
+ | Size | Classes | Use Case |
90823
+ |------|---------|----------|
90824
+ | **Small** | 'py-1 px-4 size-14 leading-13' | Compact actions, inline buttons |
90825
+ | **Medium** | 'py-2 px-6 size-15 leading-14' | Default size, most common |
90826
+ | **Large** | 'py-2 px-7 size-16 leading-16' | Primary CTAs, hero sections |
90827
+
90828
+ ### Button Variants
90829
+
90830
+ #### 1. Filled Button (Solid Background)
90831
+
90832
+ <!-- Light Background -->
90833
+ <a href="#" role="button"
90834
+ class="transition-all inline-block whitespace-nowrap cursor-pointer
90835
+ no-underline border-2 border-solid mt-2 mb-1 font-normal
90836
+ tracking-normal rounded-full py-2 px-6 size-15 leading-14
90837
+ border-transparent hover:border-transparent"
90838
+ style="color: rgb(24, 24, 27); background-color: rgb(240, 240, 241);"
90839
+ data-bg="rgb(240, 240, 241)"
90840
+ data-hover-bg="rgb(236, 236, 238)"
90841
+ onmouseover="if(this.getAttribute('data-hover-bg'))
90842
+ this.style.backgroundColor=this.getAttribute('data-hover-bg');"
90843
+ onmouseout="if(this.getAttribute('data-bg'))
90844
+ this.style.backgroundColor=this.getAttribute('data-bg');
90845
+ else this.style.backgroundColor='';">
90846
+ Read More
90847
+ </a>
90848
+
90849
+ <!-- Dark Background -->
90850
+ <a href="#" role="button"
90851
+ class="transition-all inline-block whitespace-nowrap cursor-pointer
90852
+ no-underline border-2 border-solid mt-2 mb-1 font-normal
90853
+ tracking-normal rounded-full py-2 px-6 size-15 leading-14
90854
+ border-transparent hover:border-transparent"
90855
+ style="color: rgb(250, 250, 250); background-color: rgb(24, 24, 27);"
90856
+ data-bg="rgb(24, 24, 27)"
90857
+ data-hover-bg="rgb(63, 63, 70)"
90858
+ onmouseover="if(this.getAttribute('data-hover-bg'))
90859
+ this.style.backgroundColor=this.getAttribute('data-hover-bg');"
90860
+ onmouseout="if(this.getAttribute('data-bg'))
90861
+ this.style.backgroundColor=this.getAttribute('data-bg');
90862
+ else this.style.backgroundColor='';">
90863
+ Get Started
90864
+ </a>
90865
+
90866
+ <!-- Dark Background (Square) -->
90867
+ <a href="#" role="button"
90868
+ class="transition-all inline-block whitespace-nowrap cursor-pointer
90869
+ no-underline border-2 border-solid mt-2 mb-1 font-normal
90870
+ tracking-normal py-2 px-6 size-15 leading-14
90871
+ border-transparent hover:border-transparent"
90872
+ style="color: rgb(250, 250, 250); background-color: rgb(24, 24, 27);"
90873
+ data-bg="rgb(24, 24, 27)"
90874
+ data-hover-bg="rgb(63, 63, 70)"
90875
+ onmouseover="if(this.getAttribute('data-hover-bg'))
90876
+ this.style.backgroundColor=this.getAttribute('data-hover-bg');"
90877
+ onmouseout="if(this.getAttribute('data-bg'))
90878
+ this.style.backgroundColor=this.getAttribute('data-bg');
90879
+ else this.style.backgroundColor='';">
90880
+ Get Started
90881
+ </a>
90882
+
90883
+ **Key classes:** 'no-underline' + 'border-transparent' + inline background color
90884
+ ` + `
90885
+ #### 2. Outline Button (Border Only)
90886
+
90887
+ <a href="#" role="button"
90888
+ class="transition-all inline-block whitespace-nowrap cursor-pointer
90889
+ no-underline border-2 border-solid mt-2 mb-1 font-normal
90890
+ tracking-normal rounded-full py-2 px-6 size-15 leading-14
90891
+ border-current hover:border-current">
90892
+ Read More
90893
+ </a>
90894
+
90895
+ **Key classes:** 'no-underline' + 'border-current' (inherits text color)
90896
+
90897
+ #### 3. Text Button (Underline)
90898
+
90899
+ **For single text button:**
90900
+
90901
+ <div>
90902
+ <a href="#" role="button"
90903
+ class="transition-all inline-block whitespace-nowrap cursor-pointer
90904
+ border-2 border-solid mt-2 mb-1 font-normal tracking-normal
90905
+ py-2 size-15 leading-14
90906
+ underline border-transparent"
90907
+ style="color: rgb(24, 24, 27);">
90908
+ Read More
90909
+ </a>
90800
90910
  </div>
90801
90911
 
90802
- **Padding classes:**
90912
+ **Key classes:** 'underline' + 'border-transparent' (no horizontal padding needed).
90803
90913
 
90804
- - 'content-py-*' - Vertical padding (top and bottom)
90805
- - 'content-pt-*' - Top padding only
90806
- - 'content-pb-*' - Bottom padding only
90914
+ **For button groups:**
90807
90915
 
90808
- > **Available values:** 0, 10, 20, 30, 40, 50, 60, 70, 80
90916
+ When grouping multiple buttons together, ALL buttons need consistent horizontal padding (e.g. 'px-6'):
90809
90917
 
90810
- ---
90918
+ <div class="space-x-2">
90919
+ <a ... class="py-2 px-6 rounded-full" style="background-color:...">Get Started</a>
90920
+ <a ... class="py-2 px-6 underline border-transparent">Learn More</a>
90921
+ </div>
90811
90922
 
90812
- ## Complete Examples
90923
+ ### Button Groups
90813
90924
 
90814
- ### Full-Width Hero Section
90925
+ Use 'space-x-1' or 'space-x-2' class to group buttons with consistent spacing:
90815
90926
 
90816
- <div class="is-section is-box type-system-ui is-section-100 is-content-bottom">
90817
- <div class="is-overlay" style="background-color: rgb(225, 225, 225);">
90818
- <div class="is-overlay-bg"
90819
- style="background-image: url('hero.jpg');
90820
- background-position: 50% 60%;
90821
- opacity: 1;">
90822
- </div>
90823
- </div>
90824
- <div class="is-container is-content-1400">
90825
- <div class="row">
90826
- <div class="column">
90827
- <h1 class="size-72 leading-12">Hero Title</h1>
90828
- <p class="size-18 leading-17">Subtitle text</p>
90829
- </div>
90830
- </div>
90831
- </div>
90927
+ <div class="space-x-2">
90928
+ <a href="#" role="button" class="...">Read More</a>
90929
+ <a href="#" role="button" class="...">Get Started</a>
90832
90930
  </div>
90833
90931
 
90834
- ### Split Section (40/60)
90835
-
90836
- <div class="is-section type-system-ui is-section-80">
90837
- <!-- Left box: 40% -->
90838
- <div class="is-box is-box-5">
90839
- <div class="is-overlay" style="background-color: rgb(240, 240, 240);">
90840
- </div>
90841
- <div class="is-container is-content-760">
90842
- <div class="row">
90843
- <div class="column">
90844
- <h2 class="size-42 leading-13">Text Content</h2>
90845
- <p class="size-17 leading-17">Description...</p>
90846
- </div>
90847
- </div>
90848
- </div>
90849
- </div>
90850
-
90851
- <!-- Right box: 60% -->
90852
- <div class="is-box is-box-7">
90853
- <div class="is-overlay">
90854
- <div class="is-overlay-bg"
90855
- style="background-image: url('image.jpg');
90856
- background-position: 67% 60%;">
90857
- </div>
90858
- </div>
90859
- </div>
90932
+ ### Examples by Size
90933
+
90934
+ #### Small Buttons
90935
+
90936
+ <a href="#" role="button"
90937
+ class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mt-2 mb-1 font-normal tracking-normal rounded-full py-1 px-4 size-14 leading-13 border-transparent hover:border-transparent" style="color: rgb(250, 250, 250); background-color: rgb(24, 24, 27);"
90938
+ style="color: rgb(250, 250, 250); background-color: rgb(24, 24, 27);"
90939
+ data-bg="rgb(24, 24, 27)"
90940
+ data-hover-bg="rgb(63, 63, 70)"
90941
+ onmouseover="if(this.getAttribute('data-hover-bg'))this.style.backgroundColor=this.getAttribute('data-hover-bg');"
90942
+ onmouseout="if(this.getAttribute('data-bg'))this.style.backgroundColor=this.getAttribute('data-bg');else this.style.backgroundColor='';"
90943
+ Read More
90944
+ </a>
90945
+
90946
+ #### Large Buttons
90947
+
90948
+ <div>
90949
+ <a href="#" role="button"
90950
+ class="transition-all inline-block whitespace-nowrap cursor-pointer no-underline border-2 border-solid mt-2 mb-1 font-normal tracking-normal rounded-full py-2 px-7 size-16 leading-16 border-transparent hover:border-transparent"
90951
+ style="color: rgb(250, 250, 250); background-color: rgb(24, 24, 27);"
90952
+ data-bg="rgb(24, 24, 27)"
90953
+ data-hover-bg="rgb(63, 63, 70)"
90954
+ onmouseover="if(this.getAttribute('data-hover-bg'))this.style.backgroundColor=this.getAttribute('data-hover-bg');"
90955
+ onmouseout="if(this.getAttribute('data-bg'))this.style.backgroundColor=this.getAttribute('data-bg');else this.style.backgroundColor='';" >Read More</a>
90860
90956
  </div>
90861
90957
 
90862
- ### Centered Content Section
90958
+ > **Important:** Buttons are portable components. Users edit text and colors through the ContentBuilder UI, so all styling must use utility classes plus inline styles for colors.
90863
90959
 
90864
- <div class="is-section is-box type-system-ui is-section-60">
90865
- <div class="is-container is-content-900">
90866
- <div class="row">
90867
- <div class="column">
90868
- <p class="size-14 uppercase tracking-150 text-gray-400 text-center">About</p>
90869
- </div>
90870
- </div>
90871
- <div class="row">
90872
- <div class="column">
90873
- <div class="spacer height-40"></div>
90874
- </div>
90875
- </div>
90876
- <div class="row">
90877
- <div class="column">
90878
- <h2 class="size-48 leading-13 text-center">Our Story</h2>
90879
- <p class="size-17 leading-17 text-gray-600 text-center">
90880
- Company description...
90881
- </p>
90882
- </div>
90883
- </div>
90884
- </div>
90885
- </div>
90960
+ > **Hover Effect:** The 'data-bg' and 'data-hover-bg' attributes with 'onmouseover/onmouseout' handlers enable hover color changes without additional CSS.
90886
90961
 
90887
- ---
90888
- ` + `
90889
- ## Best Practices
90962
+ ### Text Colors
90890
90963
 
90891
- ### 1. Typography Class
90964
+ Use grayscale for minimalist design.
90892
90965
 
90893
- **Always include 'type-system-ui' on every section** for default typography:
90966
+ | Class | Color | Description |
90967
+ |-------|-------|-------------|
90968
+ | '.text-black' | #000 | Primary text, headings |
90969
+ | '.text-gray-700' | #374151 | Secondary text |
90970
+ | '.text-gray-600' | #6b7280 | Body text |
90971
+ | '.text-gray-500' | #9ca3af | Muted text, labels |
90972
+ | '.text-gray-400' | #d1d5db | Subtle text, placeholders |
90973
+ | '.text-gray-300' | #e5e7eb | Very subtle text |
90974
+ | '.text-gray-200' | #f3f4f6 | Ultra light text |
90894
90975
 
90895
- <div class="is-section type-system-ui is-section-100">
90976
+ ### Background Colors
90896
90977
 
90897
- This ensures consistent font rendering across all sections.
90978
+ | Class | Color | Description |
90979
+ |-------|-------|-------------|
90980
+ | '.bg-white' | #ffffff | White background |
90981
+ | '.bg-gray-50' | #fafafa | Light gray - cards, sections |
90982
+ | '.bg-gray-100' | #f3f4f6 | Slightly darker gray |
90983
+ | '.bg-black' | #000000 | Black - buttons, highlights |
90898
90984
 
90899
- ### 2. When to Use is-content-left and is-content-right
90985
+ > **Editorial Style:** Stick to black, white, and grays for a clean, minimalist aesthetic. Use color sparingly for accents.
90900
90986
 
90901
- **Primary Use Case: Full-Width Hero Sections**
90987
+ ---
90988
+ ` + `
90989
+ ## Common Patterns
90902
90990
 
90903
- 'is-content-left' and 'is-content-right' are primarily for **full-width sections** where you want content positioned to the left or right:
90991
+ ### Section Header
90904
90992
 
90905
- <!-- Hero section with left-aligned content -->
90906
- <div class="is-section is-box type-system-ui is-section-100">
90907
- <div class="is-overlay">
90908
- <div class="is-overlay-bg" style="background-image: url('hero.jpg');"></div>
90993
+ <div class="row">
90994
+ <div class="column">
90995
+ <p class="uppercase tracking-150 size-12 text-gray-400">
90996
+ Section Label
90997
+ </p>
90909
90998
  </div>
90910
- <div class="is-container is-content-1200 is-content-left">
90911
- <div class="row">
90912
- <div class="column">
90913
- <h1 class="size-72 leading-12">Hero Title</h1>
90914
- </div>
90915
- </div>
90999
+ </div>
91000
+ <div class="row">
91001
+ <div class="column">
91002
+ <div class="spacer height-40"></div>
90916
91003
  </div>
90917
91004
  </div>
90918
91005
 
90919
- > **Note:** Center alignment is the default - no class needed.
91006
+ ### Card with Padding
90920
91007
 
90921
- **Split Sections: Generally NOT Needed**
91008
+ <div class="p-12 bg-gray-50">
91009
+ <p class="size-18 leading-17 text-black pb-4">
91010
+ Card title or content
91011
+ </p>
91012
+ <p class="size-14 text-gray-600">
91013
+ Secondary text
91014
+ </p>
91015
+ </div>
90922
91016
 
90923
- In split sections, **avoid using is-content-left or is-content-right** because:
91017
+ ### Feature with Number
91018
+
91019
+ <div class="column">
91020
+ <p class="size-14 font-semibold tracking-150 text-gray-300 pb-4">
91021
+ 01
91022
+ </p>
91023
+ <h3 class="size-32 font-normal leading-13 pb-4">
91024
+ Feature Title
91025
+ </h3>
91026
+ <p class="size-16 leading-17 text-gray-600">
91027
+ Feature description text here.
91028
+ </p>
91029
+ </div>
90924
91030
 
90925
- 1. **Small boxes (is-box-5, is-box-4, etc.)** are already narrow - left/right alignment doesn't make sense
90926
- 2. **Even is-box-6 (50% width)** - if content is wide (like is-content-540), it already takes up most of the box width, so left/right positioning has little effect
91031
+ ### Centered Content
90927
91032
 
90928
- <!-- CORRECT: Split section WITHOUT left/right alignment -->
90929
- <div class="is-section type-system-ui is-section-70">
90930
- <div class="is-box is-box-6">
90931
- <div class="is-container is-content-540">
90932
- <!-- ✓ Centered naturally, no positioning needed -->
90933
- <div class="row">
90934
- <div class="column">
90935
- <h2 class="size-42 leading-13">Content</h2>
90936
- </div>
90937
- </div>
90938
- </div>
90939
- </div>
90940
- <div class="is-box is-box-6">
90941
- <!-- Image box -->
91033
+ <div class="row">
91034
+ <div class="column">
91035
+ <h1 class="size-60 font-light leading-12 text-center">
91036
+ Centered Heading
91037
+ </h1>
90942
91038
  </div>
90943
91039
  </div>
90944
91040
 
90945
- <!-- INCORRECT: Unnecessary left alignment in split section -->
90946
- <div class="is-section type-system-ui is-section-70">
90947
- <div class="is-box is-box-6">
90948
- <div class="is-container is-content-540 is-content-left">
90949
- <!-- Doesn't make sense - content is already wide -->
90950
- </div>
91041
+ ### Image Grid
91042
+
91043
+ <div class="row">
91044
+ <div class="column">
91045
+ <p class="uppercase tracking-150 size-12 text-gray-400">Meet The Team</p>
90951
91046
  </div>
90952
91047
  </div>
90953
-
90954
- **Exception: Small Content Like Captions**
90955
-
90956
- Only use 'is-content-left' or 'is-content-right' in split sections for **very small content** (is-content-300 or smaller) where positioning makes a visual difference:
90957
-
90958
- <!-- CORRECT: Small caption aligned left in split section -->
90959
- <div class="is-section type-system-ui is-section-80">
90960
- <div class="is-box is-box-6">
90961
- <div class="is-overlay">
90962
- <div class="is-overlay-bg" style="background-image: url('photo.jpg');
90963
- background-position: 50% 50%;">
90964
- </div>
90965
- </div>
91048
+ <div class="row">
91049
+ <div class="column">
91050
+ <div class="spacer height-60"></div>
90966
91051
  </div>
90967
- <div class="is-box is-box-6 is-content-bottom edge-y-1">
90968
- <div class="is-overlay"></div>
90969
- <div class="is-container is-content-300 is-content-left">
90970
- <div class="row">
90971
- <div class="column">
90972
- <p class="size-14 text-gray-500">Photo caption text</p>
90973
- </div>
90974
- </div>
90975
- </div>
91052
+ </div>
91053
+ <div class="row">
91054
+ <div class="column">
91055
+ <img class="pb-2" src="https://placehold.co/400x400/f5f5f5/999?text=Alex+T" alt="Team Member">
91056
+ <h4 class="size-18 font-medium pb-2 text-center">Alex Thompson</h4>
91057
+ <p class="size-12 uppercase tracking-150 text-gray-500 pb-3 text-center">Founder &amp; CEO</p>
91058
+ <p class="size-15 leading-16 text-gray-600 text-center">Visionary leader with 15 years of experience.</p>
91059
+ </div>
91060
+ <div class="column">
91061
+ <img class="pb-2" src="https://placehold.co/400x400/f5f5f5/999?text=Sophia+M" alt="Team Member">
91062
+ <h4 class="size-18 font-medium pb-2 text-center">Sophia Martinez</h4>
91063
+ <p class="size-12 uppercase tracking-150 text-gray-500 pb-3 text-center">CTO</p>
91064
+ <p class="size-15 leading-16 text-gray-600 text-center">Technical architect building systems.</p>
90976
91065
  </div>
90977
91066
  </div>
90978
91067
 
90979
- **CRITICAL: Width Limits with Left/Right Alignment**
91068
+ ## Best Practices
91069
+
91070
+ ### 1. Typography Hierarchy
90980
91071
 
90981
- If you do use 'is-content-left' or 'is-content-right':
90982
- - **Maximum container width: is-content-540** (preferably smaller)
90983
- - Wider containers can overflow box boundaries
90984
- - This is because max-width only works properly when containers are centered
91072
+ - **Large Headings:** Use 'size-48' to 'size-96' with 'font-light' and 'leading-12'
91073
+ - **Medium Headings:** Use 'size-28' to 'size-42' with 'font-normal' and 'leading-13'
91074
+ - **Body Text:** Use 'size-16' to 'size-18' with 'text-gray-600' and 'leading-17'
91075
+ - **Labels:** Use 'size-12' to 'size-14' with 'uppercase tracking-150' and 'text-gray-400'
90985
91076
 
90986
- **Guidelines:**
90987
- - **Full-width sections** → Use is-content-left/right for left or right positioning (center is default)
90988
- - **Split sections** → Usually DON'T use left/right alignment (content centers naturally)
90989
- - **Split sections with tiny captions** → Can use left/right for small content (≤ is-content-300)
90990
- - **Width limit** → If using left/right alignment, max is-content-540
91077
+ ### 2. Color Usage
90991
91078
 
90992
- ### 3. Section Structure
91079
+ - Primary text: 'text-black'
91080
+ - Body text: 'text-gray-600'
91081
+ - Muted text: 'text-gray-500' or 'text-gray-400'
90993
91082
 
90994
- **Always use this hierarchy:**
90995
- - Section → Box → Overlay + Container → Row → Column
91083
+ ### 3. Structure Rules
90996
91084
 
90997
- **Never skip layers** or nest sections inside sections.
91085
+ - Always wrap content in '.row' '.column'
91086
+ - Never place text/content directly under container
91087
+ - Wrap all links in '<p>' or '<div>'
91088
+ - Keep layout structure *flat* (no nested rows/columns inside other columns)
90998
91089
 
90999
- ### 4. Background Images
91090
+ ### 4. Minimalist Approach
91000
91091
 
91001
- - Use 'background-position' to control focal point
91002
- - Common positions: '50% 60%' (centered, slightly below middle), '67% 60%' (right of center)
91003
- - Adjust opacity for overlay effects: '0.7' to '0.9' for subtle tint
91092
+ - Use generous white space
91093
+ - Keep color palette minimal (black, white, grays)
91094
+ - Use light font weights for headings
91095
+ - Maintain visual hierarchy through size and spacing, not color
91004
91096
 
91005
- ### 5. Content Width
91097
+ ### 5. When creating multi-column layouts:
91006
91098
 
91007
- - **Text-heavy content:** Use narrower widths (760-900px) for better readability
91008
- - **Visual layouts:** Use wider widths (1200-1400px)
91009
- - **Full bleed designs:** Use ultra-wide (1600-1740px)
91010
- ` + `
91011
- ### 6. Vertical Positioning
91099
+ Columns have default padding (1rem left/right) which handles most cases.
91100
+
91101
+ **Do NOT use:**
91012
91102
 
91013
- - **Hero sections:** Use 'is-content-bottom' to anchor text at bottom
91014
- - **Centered messages:** Use default (middle) positioning
91015
- - **Headers/navigation areas:** Use 'is-content-top'
91103
+ - pr-* pl-* px-* for column spacing
91104
+ Use gap when you need **MORE** spacing than the default.
91105
+ - Padding classes on columns (except for image gallery exception)
91016
91106
 
91017
- ### 7. Mobile Responsiveness
91107
+ Images have no default margin, so add pb-* to columns for mobile stacking:
91018
91108
 
91019
- The framework handles mobile automatically:
91020
- - Boxes stack to 100% width
91021
- - Containers center horizontally
91022
- - Edge adjustments apply only on desktop
91109
+ <div class="row" style="gap:20px">
91110
+ <div class="column pb-6"><img...></div>
91111
+ <div class="column pb-6"><img...></div>
91112
+ </div>
91023
91113
 
91024
- No mobile-specific code needed for basic layouts.
91114
+ ` + `
91115
+ ### 6. Vertical Centering
91116
+ When creating side-by-side layouts with vertical positioning:
91025
91117
 
91026
- ### 8. Combining with Content.css
91118
+ **For functional alignment (content should align based on column height):**
91119
+ Use flexbox, NOT spacers:
91120
+ - Center: flex flex-col justify-center
91121
+ - Bottom: flex flex-col justify-end
91122
+ - Top: (default, no class needed)
91027
91123
 
91028
- The Box Framework provides structure. The Content.css Framework provides content styling.
91124
+ CORRECT:
91125
+ <div class="row" style="gap:20px">
91126
+ <div class="column">
91127
+ <img src="..." style="width: 100%; object-fit: cover;">
91128
+ </div>
91129
+ <div class="column flex flex-col justify-center">
91130
+ <h3>Title</h3>
91131
+ <p>Content...</p>
91132
+ </div>
91133
+ </div>
91029
91134
 
91030
- **Box Framework handles:**
91031
- - Page sections and layout
91032
- - Background images/colors
91033
- - Container positioning and width
91135
+ INCORRECT:
91136
+ <div class="column">
91137
+ <div class="spacer height-120"></div> ❌ (Fixed spacing breaks responsively)
91138
+ <h3>Title</h3>
91139
+ <p>Content...</p>
91140
+ </div>
91034
91141
 
91035
- **Content.css handles:**
91036
- - Typography and spacing
91037
- - Buttons and components
91038
- - Grid layout (rows/columns)
91039
- - Text colors and styles
91142
+ **For creative/editorial positioning (intentional staggered or asymmetric layouts):**
91143
+ Use spacers for deliberate visual rhythm:
91040
91144
 
91041
- Always use both frameworks together for complete designs.
91145
+ <div class="row">
91146
+ <div class="column">
91147
+ <div class="spacer height-160"></div>
91148
+ <img...>
91149
+ </div>
91150
+ <div class="column">
91151
+ <div class="spacer height-80"></div>
91152
+ <img...>
91153
+ </div>
91154
+ <div class="column">
91155
+ <h2>Title</h2>
91156
+ </div>
91157
+ </div>
91042
91158
 
91043
- ---
91159
+ **Decision guide:**
91160
+ - Content needs to align based on other column heights? → Use flexbox
91161
+ - Content should be deliberately offset for visual interest? → Use spacers
91044
91162
 
91045
- ## Common Patterns
91163
+ Spacers in editorial designs create intentional asymmetry and visual rhythm, which is different from trying to align content responsively.
91046
91164
 
91047
- ### Pattern: Image Left, Text Right
91048
91165
 
91049
- <div class="is-section type-system-ui is-section-70">
91050
- <div class="is-box is-box-6">
91051
- <div class="is-overlay">
91052
- <div class="is-overlay-bg" style="background-image: url('image.jpg');"></div>
91053
- </div>
91054
- </div>
91055
- <div class="is-box is-box-6">
91056
- <div class="is-container is-content-540 is-content-left">
91057
- <div class="row">
91058
- <div class="column">
91059
- <h3 class="size-32 leading-13">Title</h3>
91060
- <p class="size-17 leading-17 text-gray-600">Text content...</p>
91061
- </div>
91062
- </div>
91166
+ ### 7. DO NOT create nested grids (row/column inside column).
91167
+
91168
+ For horizontal layouts within a column, use simple flexbox instead of nested grids.
91169
+
91170
+ INCORRECT (nested grid):
91171
+ <div class="row">
91172
+ <div class="column">
91173
+ <div class="row">
91174
+ <div class="column"><h3>Title</h3></div>
91175
+ <div class="column"><p>Category</p></div>
91176
+ <div class="column"><p>Date</p></div>
91063
91177
  </div>
91064
91178
  </div>
91065
91179
  </div>
91066
91180
 
91067
- ### Pattern: Full-Width with Top-Aligned Narrow Content
91181
+ CORRECT (simple flexbox):
91068
91182
 
91069
- <div class="is-section is-box type-system-ui is-section-100 is-content-top edge-y-2">
91070
- <div class="is-overlay" style="background-color: rgb(250, 250, 250);">
91071
- </div>
91072
- <div class="is-container is-content-760">
91073
- <div class="row">
91074
- <div class="column">
91075
- <h1 class="size-60 leading-12">Headline</h1>
91076
- <p class="size-18 leading-17">Description...</p>
91077
- </div>
91183
+ <div class="row">
91184
+ <div class="column">
91185
+ <div class="flex justify-between items-center">
91186
+ <h3>Title</h3>
91187
+ <p>Category</p>
91188
+ <p>Date</p>
91078
91189
  </div>
91079
91190
  </div>
91080
91191
  </div>
91081
91192
 
91082
- ### Pattern: Three Equal Boxes
91193
+ INCORRECT (nested grid):
91083
91194
 
91084
- <div class="is-section type-system-ui is-section-60">
91085
- <div class="is-box is-box-4">
91086
- <div class="is-container">
91087
- <!-- Content -->
91088
- </div>
91195
+ Common flexbox utilities for simple layouts:
91196
+
91197
+ - flex justify-between = space items apart
91198
+ - flex justify-center = center items
91199
+ - flex items-center = vertically center
91200
+ - flex gap-4 = add spacing between items
91201
+
91202
+ Keep the structure flat.
91203
+ ` + `
91204
+ ### 8. Spacing in Design
91205
+
91206
+ IMPORTANT: Text elements (h1-h6, p) already have default top/bottom margins in the framework.
91207
+ The framework's default margins are designed to create proper text spacing. Only add padding for design purposes (borders, containers, backgrounds), not for basic text spacing.
91208
+
91209
+ Guidelines:
91210
+ - For borders between items: pb-2 pt-2 is sufficient
91211
+ - For visual grouping: pb-3 pt-3 maximum
91212
+ - For design containers (backgrounds, cards, boxes): use generous padding (p-8, p-10, p-12, etc.)
91213
+ - For major section breaks: use spacer elements instead
91214
+ - Trust default margins - don't fight them with excessive padding
91215
+
91216
+ CORRECT (minimal padding with borders):
91217
+ <div class="pb-2" style="border-bottom: 1px solid #f0f0f0;">
91218
+ <div class="flex justify-between items-center">
91219
+ <p class="size-14 uppercase tracking-150 text-gray-500">Material</p>
91220
+ <p class="size-16 text-gray-700">Solid Oak, Italian Leather</p>
91089
91221
  </div>
91090
- <div class="is-box is-box-4">
91091
- <div class="is-container">
91092
- <!-- Content -->
91093
- </div>
91222
+ </div>
91223
+ <div class="pb-2 pt-2" style="border-bottom: 1px solid #f0f0f0;">
91224
+ <div class="flex justify-between items-center">
91225
+ <p class="size-14 uppercase tracking-150 text-gray-500">Dimensions</p>
91226
+ <p class="size-16 text-gray-700">76 × 68 × 82 cm</p>
91094
91227
  </div>
91095
- <div class="is-box is-box-4">
91096
- <div class="is-container">
91097
- <!-- Content -->
91098
- </div>
91228
+ </div>
91229
+
91230
+ INCORRECT (excessive padding):
91231
+ <div class="pb-6" style="border-bottom: 1px solid #f0f0f0;">
91232
+ <div class="flex justify-between items-center pb-4"> ❌
91233
+ <p class="size-14 uppercase tracking-150 text-gray-500">Material</p>
91234
+ <p class="size-16 text-gray-700">Solid Oak, Italian Leather</p>
91099
91235
  </div>
91100
91236
  </div>
91237
+ <div class="pb-6 pt-6" style="border-bottom: 1px solid #f0f0f0;"> ❌
91238
+ <div class="flex justify-between items-center pb-4"> ❌
91239
+ <p class="size-14 uppercase tracking-150 text-gray-500">Dimensions</p>
91240
+ <p class="size-16 text-gray-700">76 × 68 × 82 cm</p>
91241
+ </div>
91242
+ </div>
91243
+
91244
+ CORRECT (intentional design padding):
91245
+ <div class="p-12 bg-gray-50">
91246
+ <p class="size-18 leading-17 text-black pb-8">Quote text...</p>
91247
+ <p class="size-14 font-semibold text-black pb-2">Name</p>
91248
+ <p class="size-13 text-gray-600">Title</p>
91249
+ </div>
91250
+
91251
+ Generous padding is appropriate for visual design elements like cards, testimonials, or highlighted sections.
91252
+
91253
+ ### 9. Icons
91254
+
91255
+ When creating icon-based features, benefits, or service sections: use Bootstrap Icons, NOT emojis. The framework includes Bootstrap Icons support. Wrap icons in a div for proper display:
91256
+
91257
+ <div class="text-center pb-6">
91258
+ <i class="bi bi-lightning size-42"></i>
91259
+ </div>
91260
+ <h4 class="size-18 font-medium text-center pb-3">Lightning Fast</h4>
91261
+ <p class="size-14 leading-16 text-gray-600 text-center">Description...</p>
91262
+
91101
91263
  `;
91102
91264
 
91103
91265
  const contextCodeBlock = `
@@ -92566,7 +92728,7 @@ class ContentBuilder {
92566
92728
  this.ShortcutInfo = new ShortcutInfo(this);
92567
92729
  if (!this.opts.isContentBox) {
92568
92730
  this.codechat = new CodeChat({
92569
- context: contextBoxFramework + contextCodeBlock
92731
+ context: contextContentFramework + contextCodeBlock
92570
92732
  }, this);
92571
92733
  if (this.startAIAssistant) {
92572
92734
  this.openAIAssistant();
@@ -94034,7 +94196,8 @@ class ContentBuilder {
94034
94196
  }
94035
94197
 
94036
94198
  // Apply behavior on each row
94037
- const rows = this.dom.elementChildren(builder);
94199
+ let rows;
94200
+ if (this.useDefaultGrid) rows = builder.querySelectorAll('.row');else rows = this.dom.elementChildren(builder);
94038
94201
  rows.forEach(row => {
94039
94202
  // Skip if not a DIV
94040
94203
  if (row.tagName !== 'DIV') return;
@@ -94055,6 +94218,39 @@ class ContentBuilder {
94055
94218
 
94056
94219
  // On each row, add 2 tools: Row tool (div.is-row-tool) & Row Add tool (div.is-rowadd-tool)
94057
94220
 
94221
+ // Validate gap
94222
+ const style = window.getComputedStyle(row);
94223
+ const gapValue = parseFloat(style.gap) || 0;
94224
+ const columns = row.querySelectorAll('.column');
94225
+ let allHaveWidth = true;
94226
+ let totalWidthPercent = 0;
94227
+ columns.forEach(col => {
94228
+ const colStyle = col.getAttribute('style') || '';
94229
+ const match = colStyle.match(/width:\s*([\d.]+)%/);
94230
+ if (match) {
94231
+ totalWidthPercent += parseFloat(match[1]);
94232
+ } else {
94233
+ allHaveWidth = false;
94234
+ }
94235
+ });
94236
+ if (allHaveWidth) {
94237
+ const colCount = columns.length;
94238
+ const totalGapPercent = gapValue / row.clientWidth * 100 * (colCount - 1);
94239
+ const combined = totalWidthPercent + totalGapPercent;
94240
+ if (combined >= 100) {
94241
+ row.style.gap = '';
94242
+ row.classList.remove('gap-10');
94243
+ row.classList.remove('gap-20');
94244
+ row.classList.remove('gap-30');
94245
+ row.classList.remove('gap-40');
94246
+ row.classList.remove('gap-50');
94247
+ row.classList.remove('gap-60');
94248
+ row.classList.remove('gap-70');
94249
+ row.classList.remove('gap-80');
94250
+ row.classList.remove('gap-90');
94251
+ }
94252
+ }
94253
+
94058
94254
  // Render Row tool
94059
94255
  this._rowTool.render(row);
94060
94256
 
@@ -94063,7 +94259,8 @@ class ContentBuilder {
94063
94259
  rowaddtool.render(row);
94064
94260
 
94065
94261
  // Apply behavior on each column
94066
- const cols = this.dom.elementChildren(row);
94262
+ let cols;
94263
+ if (this.useDefaultGrid) cols = row.querySelectorAll('.column');else cols = this.dom.elementChildren(row);
94067
94264
  cols.forEach(col => {
94068
94265
  if (this.dom.hasClass(col, 'is-row-tool') || this.dom.hasClass(col, 'is-col-tool') || this.dom.hasClass(col, 'is-rowadd-tool')) return; // Return if not a column
94069
94266
 
@@ -97143,6 +97340,7 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
97143
97340
  if (!this.controlPanel) this.rte.click(col);
97144
97341
  }
97145
97342
  handleCellClick(col, e) {
97343
+ if (col !== e.target.closest('.column')) return;
97146
97344
  if (this.cleanEditing) {
97147
97345
  col.parentNode.querySelector('.is-row-tool').style.display = '';
97148
97346
  col.parentNode.querySelector('.is-col-tool').style.display = '';