### Project Setup: Web App and WordPress Plugin Commands
Source: https://context7.com/context7/coreframework/llms.txt
Instructions for setting up a new Core Framework project, covering both the web application and WordPress plugin installations. The web app involves account creation and project initiation, while the plugin requires installation and activation via the WordPress dashboard.
```bash
# Web App: Visit https://coreframework.com/app
# 1. Create account and login
# 2. Click "Open Web App" in top right
# 3. Enter project name and click "Create"
# 4. Project opens with standard baseline setup
# WordPress Plugin: Install from WordPress repository
# 1. Download and activate Core Framework plugin
# 2. Access from WordPress dashboard
# 3. Configure preferences for site integration
```
--------------------------------
### Initial Project Configuration via JavaScript
Source: https://context7.com/context7/coreframework/llms.txt
Guides the initial configuration of a Core Framework project using JavaScript. It outlines choices for starting templates (full, variables only, or empty), license key activation for builder addons (WordPress specific), and basic preference settings like root font size and dark mode.
```javascript
// Step 1: Choose your starting template
// Option A: Full experience (recommended for UI kits)
// - Imports colors, typography, spacing
// - Generates utility classes and variables
// Option B: Variables Only (minimalistic)
// - Generates only variables for colors, typography, spacing, radii
// - Smaller CSS output
// Option C: Empty (create your own)
// - Empty setup with default typography and spacing structure
// Step 2 (WordPress only): Add builder addon license keys
// - Enter license keys for Oxygen/Bricks/Gutenberg addons
// - Click checkmark to activate
// Step 3: Basic preferences
// - Root font size: Choose 100% or 62.5%
// - Dark mode: Toggle on to enable light/dark color options
```
--------------------------------
### Project Import/Export Workflow (JavaScript)
Source: https://context7.com/context7/coreframework/llms.txt
Details the process for exporting a project as a JSON file for backup or offline sharing, and importing a project from a JSON file. Includes an example of the JSON structure.
```javascript
// Export project as file (backup or offline sharing)
// Navigate to "Manage Project" section
// Click "Export Project"
// Downloads JSON file with all settings
// Import project from file
// Navigate to "Manage Project" section
// Click "Import Project"
// Select JSON file
// Project loaded with all settings
// Example JSON structure (simplified)
{
"projectName": "My Design System",
"version": "1.6.0",
"preferences": {
"rootFontSize": "100%",
"defaultTheme": "auto",
"classPrefix": "ds-",
"variablePrefix": "ds-"
},
"colors": [
{
"name": "primary",
"light": "#3b82f6",
"dark": "#60a5fa",
"utilities": ["text", "background", "border"],
"transparentVariants": true,
"shades": 5,
"tints": 5
}
],
"typography": {
"mode": "automatic",
"minBase": "16px",
"maxBase": "18px",
"ratio": "perfectFourth"
},
"spacing": {
"mode": "automatic",
"minBase": "16px",
"maxBase": "24px",
"ratio": "perfectFourth"
},
"components": [
{
"type": "button",
"baseClass": "btn",
"modifiers": ["btn-primary", "btn-secondary"],
"states": ["hover", "focus", "active"]
}
]
}
```
--------------------------------
### Bricks Builder Addon Integration (PHP)
Source: https://context7.com/context7/coreframework/llms.txt
Illustrates how to integrate the Core Framework with Bricks Builder by configuring Theme Styles for color palette and typography, and shows an example of using Core Framework classes within Bricks.
```php
Column 1
Column 2
```
--------------------------------
### Generic HTML/CSS Integration with Core Framework
Source: https://context7.com/context7/coreframework/llms.txt
This example shows a basic HTML structure for integrating Core Framework. It includes linking the framework's CSS, implementing a dark mode toggle script using local storage and CSS variables, and using Core Framework's utility classes for layout, typography, and components.
```html
Core Framework Site
My Website
Welcome to Our Site
Built with Core Framework
Feature 1
Description here
Feature 2
Description here
Feature 3
Description here
```
--------------------------------
### Generating and Using CSS Utility Classes from Colors
Source: https://context7.com/context7/coreframework/llms.txt
Explains how to generate utility classes for text, background, and border colors directly from the Core Framework interface. It provides examples of the generated CSS and how to apply these classes in HTML for quick styling.
```css
/* Click down arrow on color row to expand options
* Check "Generate Utility Classes" and select:
* - Text
* - Background
* - Border
*/
/* Generated utility classes */
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.border-primary { border-color: var(--primary); }
/* Usage in HTML */
Primary background
Secondary heading
Primary border
```
--------------------------------
### Get Class Names and Variables using CoreFramework Helper
Source: https://docs.coreframework.com/development/coreframework-helper
This PHP snippet demonstrates how to use the CoreFramework Helper class to retrieve an array of class names and variables. It includes checks for plugin activation and class existence, and shows examples of using the `getClassNames` and `getVariables` methods with and without category grouping.
```php
use CoreFramework\Helper;
if (is_plugin_active('core-framework/core-framework.php')) {
if (class_exists('CoreFramework\Helper')) {
$helper = new Helper();
$class_names = $helper->getClassNames();
$class_names = $helper->getClassNames([
'group_by_category' => false,
]);
$variables = $helper->getVariables();
$variables = $helper->getVariables([
'group_by_category' => false,
]);
}
}
```
--------------------------------
### CSS Vendor Prefixing Example (PostCSS)
Source: https://docs.coreframework.com/navigating-the-ui/preferences
Demonstrates how PostCSS automatically adds vendor prefixes and fallbacks to CSS rules for cross-browser compatibility. This allows developers to write CSS without manually including prefixes.
```css
::placeholder {
color: gray;
}
```
```css
::-moz-placeholder {
color: gray;
}
::placeholder {
color: gray;
}
```
--------------------------------
### CSS Color Variables and Formats
Source: https://context7.com/context7/coreframework/llms.txt
Demonstrates the CSS syntax for defining color variables within Core Framework. It shows basic hex, RGB, HSL, and RGBA color formats, along with examples of text, background, and border color variables.
```css
/* Navigate to Colors section
* Default groups: brand, text, background, base
* Click + icon under last color to add new color
* Click color or value field to open color picker
*/
/* Basic color variable */
:root {
--primary: #3b82f6;
--secondary: #8b5cf6;
--text-base: #1f2937;
--bg-base: #ffffff;
}
/* Color picker supports multiple formats */
:root {
--color-hex: #3b82f6;
--color-rgb: rgb(59, 130, 246);
--color-hsl: hsl(217, 91%, 60%);
--color-rgba: rgba(59, 130, 246, 0.8);
}
```
--------------------------------
### Gutenberg Addon Setup for Core Framework
Source: https://context7.com/context7/coreframework/llms.txt
This snippet demonstrates how to integrate Core Framework with Gutenberg blocks by adding custom CSS classes and configuring theme.json for color palettes and font sizes. It leverages Core Framework's utility classes for styling and design system consistency within the WordPress block editor.
```javascript
// After installing Core Framework addon for Gutenberg
// Variables available in block editor
// Using Core Framework classes in Gutenberg blocks
// Add to block's "Additional CSS Class(es)" field:
// "columns-3 gap-l p-xl"
// In theme.json (optional integration)
{
"version": 2,
"settings": {
"color": {
"palette": [
{
"name": "Primary",
"slug": "primary",
"color": "var(--primary)"
},
{
"name": "Secondary",
"slug": "secondary",
"color": "var(--secondary)"
}
]
},
"typography": {
"fontSizes": [
{
"name": "Small",
"slug": "small",
"size": "var(--text-s)"
},
{
"name": "Medium",
"slug": "medium",
"size": "var(--text-m)"
},
{
"name": "Large",
"slug": "large",
"size": "var(--text-l)"
}
]
}
}
}
```
--------------------------------
### Generate CSS Shades and Tints
Source: https://context7.com/context7/coreframework/llms.txt
Creates darker versions (shades by mixing with black) and lighter versions (tints by mixing with white) of a base color. Users can select the number of variations from 3 to 10. Examples show usage in gradients and backgrounds.
```css
/* Shades: darker versions (mixing with black)
* Tints: lighter versions (mixing with white)
* Select count: 3 to 10 variations
*/
/* Generated shades (darker) - Example with count=5 */
:root {
--primary: #3b82f6;
--primary-shade-1: #2e68c4;
--primary-shade-2: #214e92;
--primary-shade-3: #143460;
--primary-shade-4: #071a2e;
--primary-shade-5: #000000;
}
/* Generated tints (lighter) - Example with count=5 */
:root {
--primary-tint-1: #5c9bf8;
--primary-tint-2: #7db4fa;
--primary-tint-3: #9ecdfc;
--primary-tint-4: #bfe6fe;
--primary-tint-5: #ffffff;
}
/* Usage in gradients and variations */
Light background
```
--------------------------------
### Global Stylesheet for Core Framework (CSS)
Source: https://docs.coreframework.com/official-ui-kits/violet
This CSS code defines global styles for various elements and components within the Core Framework. It includes styles for text links with icons, gradient text, tagged text, and primary/secondary pills. Ensure this is added to your global stylesheet for proper functionality of imported sections.
```css
.text-link--icon-right > .ct-fancy-icon {
transition: transform 0.4s;
}
.text-link--icon-right:hover > .ct-fancy-icon {
transform: translateX(3px);
}
.c-v-text-link--il > .ct-fancy-icon {
transition: transform 0.4s;
}
.c-v-text-link--il:hover > .ct-fancy-icon {
transform: translateX(-3px);
}
.text-gradient--primary{
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline;
background-image: linear-gradient(120deg, var(--primary), var(--primary-l-2));
}
.text-tag--primary:after{
padding: 4px 6px;
border-radius: var(--radius-s);
margin-left: var(--space-2xs);
font-size: .8rem;
letter-spacing: 0;
text-transform: uppercase;
background-color: var(--primary-10);
color: var(--text-body);
border: 1px solid var(--primary);
font-weight: 500;
content: attr(data-tag);
margin-top: auto;
margin-bottom: auto;
}
.text-tag--secondary:after {
padding: 4px 6px;
border-radius: var(--radius-s);
margin-left: var(--space-2xs);
font-size: .8rem;
letter-spacing: 0;
text-transform: uppercase;
background-color: var(--secondary-10);
color: var(--text-body);
border: 1px solid var(--secondary);
font-weight: 500;
content: attr(data-tag);
margin-top: auto;
margin-bottom: auto;
}
.pill-primary {
background-color: var(--primary-10);
padding: 5px 10px;
font-size: var(--text-s);
color: var(--text-body);
font-weight: 600;
display: flex;
flex-direction: row;
align-items: center;
justify-content: middle;
border: 1px solid var(--primary);
}
.pill-secondary {
background-color: var(--secondary-10);
padding: 5px 10px;
font-size: var(--text-s);
color: var(--text-body);
font-weight: 600;
display: flex;
flex-direction: row;
align-items: center;
justify-content: middle;
border: 1px solid var(--secondary);
}
```
--------------------------------
### Create Custom CSS Color Groups
Source: https://context7.com/context7/coreframework/llms.txt
Allows users to create custom named color groups (e.g., 'Status Colors') by adding individual colors. The example shows a 'Status Colors' group with utility classes for text and background color manipulation.
```css
/* Click "Create new color group" at bottom
* Enter group name (e.g., "Status Colors")
* Add colors with + icon
*/
/* Example: Status color group */
:root {
/* Status Colors */
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--info: #3b82f6;
}
/* With utility classes enabled */
.text-success { color: var(--success); }
.bg-success { background-color: var(--success); }
.text-error { color: var(--error); }
.bg-error { background-color: var(--error); }
```
--------------------------------
### Generate Transparent CSS Variants
Source: https://context7.com/context7/coreframework/llms.txt
Automatically generates 9 levels of transparency (10% to 90%) for a base color. This is achieved by creating RGBA values for each transparency level. Usage examples demonstrate applying these variants to backgrounds.
```css
/* Check "Generate Transparent Variants" in color options
* Automatically creates 9 transparency levels: 10% to 90%
*/
/* Generated transparent variants */
:root {
--primary: #3b82f6;
--primary-10: rgba(59, 130, 246, 0.1);
--primary-20: rgba(59, 130, 246, 0.2);
--primary-30: rgba(59, 130, 246, 0.3);
--primary-40: rgba(59, 130, 246, 0.4);
--primary-50: rgba(59, 130, 246, 0.5);
--primary-60: rgba(59, 130, 246, 0.6);
--primary-70: rgba(59, 130, 246, 0.7);
--primary-80: rgba(59, 130, 246, 0.8);
--primary-90: rgba(59, 130, 246, 0.9);
}
/* Usage example */
20% opacity overlay
80% opacity background
```
--------------------------------
### Generate CSS Spacing Utility Classes
Source: https://context7.com/context7/coreframework/llms.txt
Generates CSS utility classes for spacing, including gap, margin, and padding. It utilizes CSS variables for consistent spacing values and provides examples for usage in HTML. These classes are defined within the Spacing section of the framework.
```css
/* Enable utility class generation in Spacing section
* Three sets available: Gap, Margin, Padding
*/
/* Generated gap classes */
.gap-3xs { gap: var(--space-3xs); }
.gap-xs { gap: var(--space-xs); }
.gap-s { gap: var(--space-s); }
.gap-m { gap: var(--space-m); }
.gap-l { gap: var(--space-l); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
/* Generated margin classes */
.m-s { margin: var(--space-s); }
.mt-s { margin-top: var(--space-s); }
.mr-s { margin-right: var(--space-s); }
.mb-s { margin-bottom: var(--space-s); }
.ml-s { margin-left: var(--space-s); }
/* Repeats for all sizes */
/* Generated padding classes */
.p-m { padding: var(--space-m); }
.pt-m { padding-top: var(--space-m); }
.pr-m { padding-right: var(--space-m); }
.pb-m { padding-bottom: var(--space-m); }
.pl-m { padding-left: var(--space-m); }
/* Repeats for all sizes */
/* Usage in HTML */
Section Title
```
--------------------------------
### Custom CSS Utility Selector Groups (CSS)
Source: https://context7.com/context7/coreframework/llms.txt
This CSS code illustrates how to create custom utility classes within the Core Framework by defining selector groups. Examples include width utilities, flexbox utilities, and text alignment classes. These groups can be created by navigating to the relevant section and clicking 'Create a selector group'.
```css
/* Example: Width utility classes */
/* Group name: "Width Utilities" */
.full-width { width: 100%; }
.half-width { width: 50%; }
.third-width { width: 33.333%; }
.quarter-width { width: 25%; }
/* Example: Flexbox utilities */
/* Group name: "Flex Utilities" */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
justify-content: space-between;
}
.flex-wrap { flex-wrap: wrap; }
/* Example: Text alignment */
/* Group name: "Text Alignment" */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
/* Using variables in custom groups */
/* Variables auto-populate in value dropdown */
.card-spacing { padding: var(--space-l); }
.hero-text { font-size: var(--text-3xl); }
.primary-bg { background-color: var(--primary); }
```
--------------------------------
### Custom CSS Variable Groups (CSS)
Source: https://context7.com/context7/coreframework/llms.txt
This CSS code demonstrates the creation of custom variable groups in the Core Framework, which can then be used throughout your project. Examples include border-radius, z-index, animation durations, and container widths. These variables are defined within `:root` and can be referenced using the `var()` function in selector groups.
```css
/* Example: Border radius variables */
/* Group name: "Border Radius" */
:root {
--radius-sm: 0.25rem;
--radius-md: 0.5rem;
--radius-lg: 1rem;
--radius-xl: 1.5rem;
--radius-full: 9999px;
}
/* Example: Z-index system */
/* Group name: "Z-Index" */
:root {
--z-base: 1;
--z-dropdown: 100;
--z-sticky: 200;
--z-overlay: 300;
--z-modal: 400;
--z-toast: 500;
}
/* Example: Animation durations */
/* Group name: "Animations" */
:root {
--duration-fast: 150ms;
--duration-normal: 300ms;
--duration-slow: 500ms;
--easing-in: cubic-bezier(0.4, 0, 1, 1);
--easing-out: cubic-bezier(0, 0, 0.2, 1);
--easing-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}
/* Example: Container widths */
/* Group name: "Containers" */
:root {
--container-sm: 640px;
--container-md: 768px;
--container-lg: 1024px;
--container-xl: 1280px;
--container-2xl: 1536px;
}
/* Usage in selector groups */
.btn {
border-radius: var(--radius-md);
transition: all var(--duration-normal) var(--easing-out);
}
.modal {
z-index: var(--z-modal);
border-radius: var(--radius-lg);
}
.container {
max-width: var(--container-xl);
margin: 0 auto;
}
```
--------------------------------
### Customize Excerpt Length using PHP Filter
Source: https://docs.coreframework.com/official-ui-kits/corekit
This PHP code snippet modifies the default excerpt length in WordPress. It uses the 'excerpt_length' filter to set a custom number of words for excerpts. This is useful for controlling the display of content summaries on blog archives and single posts.
```php
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
/**
* Change the length of excerpt.
*
* @param int $length The number of words. Default 55.
* @return int New excerpt length.
*/
function custom_excerpt_length( $length ) {
return 20; // number of words. Default is 55.
}
```
--------------------------------
### Creating Shareable Remote Projects (Bash)
Source: https://context7.com/context7/coreframework/llms.txt
This section provides instructions in bash for creating shareable remote projects using the Core Framework web app. It outlines the steps to log in, locate the project, initiate sharing, make the project public, and copy the generated shareable URL. Recipients can preview or clone the shared project.
```bash
# 1. Login to web app: https://coreframework.com/app
# 2. Navigate to project list
# 3. Click share icon (bottom left of project card)
# 4. Modal opens with sharing options
# 5. Toggle "Make project shareable"
# 6. Copy generated URL
# Generated URL format:
# https://coreframework.com/shared/[unique-project-id]
# Recipients can:
# - Preview framework in read-only mode
# - Clone project to their account
```
--------------------------------
### Implement Manual Theme Switching with JavaScript and HTML
Source: https://context7.com/context7/coreframework/llms.txt
Demonstrates manual theme switching using HTML classes and a JavaScript function. It covers applying dark mode to the entire site, inverting themes for specific sections, locking sections to a theme, and creating a custom toggle button.
```html
Light mode content
Dark mode section in light page
Back to light mode
Always light, ignores theme toggle
Always dark, ignores theme toggle
```
--------------------------------
### Oxygen Builder Addon Integration (PHP)
Source: https://context7.com/context7/coreframework/llms.txt
Shows how to integrate the Core Framework with Oxygen Builder by configuring Global Styles for colors and typography, and demonstrates using Core Framework classes within Oxygen.
```php
Card Title
Content here
Toggle Dark Mode
```
--------------------------------
### WooCommerce Quick View AJAX - PHP
Source: https://docs.coreframework.com/official-ui-kits/woocore
Handles AJAX requests to fetch product details for a quick view modal. It retrieves product name, price, description, stock status, attributes, and images. Requires WooCommerce and WordPress AJAX. Returns JSON data.
```php
function coreframework_quick_view()
{
if (!isset($_POST['product_id'])) {
wp_send_json_error('Invalid request');
wp_die();
}
$product_id = absint($_POST['product_id']);
if (!$product_id) {
wp_send_json_error('Invalid product ID');
wp_die();
}
$product = wc_get_product($product_id);
if (!$product) {
wp_send_json_error('Product not found');
wp_die();
}
$data = [
'name' => $product->get_name(),
'price' => $product->get_regular_price(),
'price_html' => wc_price($product->get_regular_price()),
'sale' => wc_price($product->get_sale_price()),
'sale_html' => $product->get_sale_price(),
'type' => $product->get_type(),
'short_description' => $product->get_short_description(),
'stock' => $product->get_stock_status(),
'attributes' => $product->get_attributes(),
'image_id' => $product->get_image_id(),
'image' => $product->get_image(),
'image_gallery' => $product->get_gallery_image_ids(),
];
wp_send_json($data);
wp_die();
}
// Register AJAX actions for logged-in and logged-out users
add_action('wp_ajax_coreframework_quick_view', 'coreframework_quick_view');
add_action('wp_ajax_nopriv_coreframework_quick_view', 'coreframework_quick_view');
```
--------------------------------
### Responsive Grid Layouts with Breakpoints (HTML/CSS)
Source: https://context7.com/context7/coreframework/llms.txt
Demonstrates how to create responsive grid layouts using breakpoint suffixes (--on-s, --on-m, --on-l, --on-xl) to adjust column counts based on screen size. This allows for flexible designs adapting from mobile to desktop.
```html
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Card 1
Card 2
Card 3
Card 4
```
--------------------------------
### Basic Grid System Classes (HTML/CSS)
Source: https://context7.com/context7/coreframework/llms.txt
Provides utility classes for creating grid layouts with predefined column counts (2 to 8 columns). These classes utilize CSS Grid for layout. No external dependencies are required.
```html
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
```
--------------------------------
### Exporting CSS for Production (JavaScript and HTML)
Source: https://context7.com/context7/coreframework/llms.txt
This section details how to export CSS from the Core Framework for production use. It outlines three methods: downloading a CSS file, copying the full CSS, or copying the minified CSS. The provided HTML shows how to link the downloaded CSS file or embed the copied CSS directly within a `
```
--------------------------------
### Quick View Product Data AJAX Handler (PHP) - CoreFramework
Source: https://docs.coreframework.com/official-ui-kits/woocore
Handles AJAX requests to retrieve detailed product information for a quick view feature. It fetches product data such as name, price, description, stock status, and images using WooCommerce functions. Input is a product ID, and output is a JSON object containing product details.
```php
function coreframework_quick_view()
{
if (!isset($_POST['product_id'])) {
wp_send_json_error('Invalid request');
wp_die();
}
$product_id = absint($_POST['product_id']);
if (!$product_id) {
wp_send_json_error('Invalid product ID');
wp_die();
}
$product = wc_get_product($product_id);
if (!$product) {
wp_send_json_error('Product not found');
wp_die();
}
$data = [
'name' => $product->get_name(),
'price' => $product->get_regular_price(),
'price_html' => wc_price($product->get_regular_price()),
'sale' => wc_price($product->get_sale_price()),
'sale_html' => $product->get_sale_price(),
'type' => $product->get_type(),
'short_description' => $product->get_short_description(),
'stock' => $product->get_stock_status(),
'attributes' => $product->get_attributes(),
'image_id' => $product->get_image_id(),
'image' => $product->get_image(),
'image_gallery' => $product->get_gallery_image_ids(),
];
wp_send_json($data);
wp_die();
}
// Register AJAX actions for logged-in and logged-out users
// Note: The original text had a comment but no actual add_action for coreframework_quick_view
// Assuming it should be registered similar to the minicart add action:
// add_action('wp_ajax_coreframework_quick_view', 'coreframework_quick_view');
// add_action('wp_ajax_nopriv_coreframework_quick_view', 'coreframework_quick_view');
```
--------------------------------
### Import Remote Projects (JavaScript)
Source: https://context7.com/context7/coreframework/llms.txt
Demonstrates how to import remote projects into a web application or WordPress plugin by following a few simple steps. This facilitates team collaboration and distribution of design kits.
```javascript
// Import in Web App
// 1. Navigate to project list
// 2. Click "Remote Import" button
// 3. Paste shared project URL
// 4. Choose "Preview" or "Clone to my projects"
// Import in WordPress Plugin
// 1. Open Core Framework in dashboard
// 2. Navigate to "Manage Project" section
// 3. Click "Remote Import"
// 4. Paste shared project URL
// 5. Click "Import"
// Use case: Team workflows
{
"scenario": "Design system for team",
"setup": "Lead designer creates master project",
"sharing": "Generate remote URL and share with team",
"benefits": [
"Team always has latest version",
"No file version management",
"Instant updates when master changes",
"Can clone and customize per project"
]
}
// Use case: Selling design kits
{
"scenario": "Marketplace author selling UI kits",
"setup": "Create polished design system",
"distribution": "Provide remote URL to customers",
"benefits": [
"Customers always get latest updates",
"No need to send new files for updates",
"Customers can preview before purchasing",
"Easy integration into customer projects"
]
}
```
--------------------------------
### Complex Grid Layout with Responsive Breakpoints (HTML)
Source: https://context7.com/context7/coreframework/llms.txt
This HTML snippet demonstrates a complex, magazine-style grid layout using classes from the Core Framework. It includes responsive adjustments for different screen sizes (xl, l, s) and defines article spans for featured content, sidebars, and full-width banners. Ensure your builder settings match the specified breakpoints.
```html
Featured Article
Large featured content...
Article 2
Article 3
Advertisement
Article 4Article 5Article 6Article 7
```
--------------------------------
### Retrieve Core Framework Stylesheet Information
Source: https://docs.coreframework.com/development/coreframework-helper
This PHP snippet shows how to retrieve the URL, server path, and version of the Core Framework stylesheet using the Helper class. These methods are available since version 1.3.3.
```php
use CoreFramework\Helper;
$helper = new Helper();
$stylesheet_url = $helper->getStylesheetUrl();
$stylesheet_path = $helper->getStylesheetPath();
$stylesheet_version = $helper->getStylesheetVersion();
```
--------------------------------
### Card Component Styling (HTML/CSS)
Source: https://context7.com/context7/coreframework/llms.txt
Defines the styles for a reusable card component, including base styles, hover effects, and a 'featured' modifier. It also includes accessibility enhancements for links and focus states. No external dependencies are required.
```html
```
--------------------------------
### Production Preferences Configuration in JavaScript
Source: https://context7.com/context7/coreframework/llms.txt
Details the JavaScript object for configuring production-level preferences in Core Framework. This includes project settings (title, theme, font size, screen width), CSS processing options (PostCSS, REM units, gradients), prefixes for classes and variables, accessibility settings, and output formatting.
```javascript
// Navigate to Preferences section
// Project Settings
{
"projectTitle": "My Website Framework",
"defaultTheme": "auto", // "light", "dark", or "auto" (system preferences)
"rootFontSize": "100%", // or "62.5%"
"minScreenWidth": "375px",
"maxScreenWidth": "1440px" // Match your builder's max width
}
// CSS Processing
{
"enablePostCSS": true, // Auto-adds vendor prefixes
"outputREMUnits": true, // Converts px to rem
"smoothLinearGradients": true // Enhanced visual gradients
}
// Prefixes (set before building site!)
{
"classPrefix": "cf-", // Avoid conflicts: "cf-btn" instead of "btn"
"variablePrefix": "my-" // Avoid conflicts: "--my-primary" instead of "--primary"
}
// Accessibility
{
"disableHoverOnTouch": true,
"respectReducedMotion": true,
"enableClickableParent": true, // Creates .expand-click class
"disableFocusableParentOnClick": false
}
// Output
{
"addGroupComments": true // Adds CSS comments for organization
}
```
--------------------------------
### Create Base Button Component Styles (HTML/CSS)
Source: https://context7.com/context7/coreframework/llms.txt
Defines the base styles for a button component using CSS, including display, padding, font properties, border, and transition effects. It also sets the default background color and text color. This is part of the Component Editor's functionality for creating new components.
```html
```