EliteCart comes with an incredibly powerful design editor that offers extensive styling and customization options. You can adjust important colors, layouts and styles with a click of a button using our intuitive interface and live preview. However, when you need that extra level of customization that goes beyond what our editor can achieve, the AI CSS Generator is available.
This advanced tool allows you to describe the changes you want in plain English, and our AI will automatically generate professional CSS code that targets your cart's specific elements.
The AI CSS Generator transforms natural language descriptions into professional CSS code. Instead of writing complex CSS rules manually, you can simply describe what you want to achieve, and our AI will:
Analyze your current cart structure
Generate CSS targeting the appropriate elements
Follow best practices for maintainable code
Respect your existing styles and customizations
Our AI CSS generator uses cutting-edge LLMs to understand your requests and convert them into clean, professional CSS. Here's what happens behind the scenes:
Structure Analysis: The AI examines your cart's HTML structure to understand what elements are available
Smart Targeting: It identifies the best CSS classes to target (prioritizing EliteCart-specific .ec-
classes)
Code Generation: Professional CSS is generated following industry best practices
Integration: The CSS seamlessly integrates with your existing styles
Navigate to Cart Design → Custom CSS
Look for the AI Generate CSS button below the CSS editor
Click the button to open the AI prompt interface
The key to getting great results is writing clear, descriptive prompts. Here are some examples:
Good prompts:
"Make the corners of the checkout button fully round"
"Change the cart header to have a gradient background from blue to purple"
"Add a subtle border around each cart item"
"Make the quantity input buttons larger and more prominent"
"Style the checkout button with a green background and white text"
Bad prompts:
"Make it look better" (too vague)
"Change colors" (not specific enough)
"Fix the design" (unclear what needs fixing)
When you have existing CSS, you'll see two options:
Modify existing: The AI will preserve your current CSS and add modifications to it
Start from scratch: The AI will create entirely new CSS based on your prompt
If you don't have any existing CSS, you'll simply see a Generate CSS button.
Be specific: Instead of "make buttons better," say "make buttons more rounded with a subtle drop shadow"
Mention colors: Use specific color names or hex codes when possible
Describe layout changes: Clearly explain spacing, sizing, or positioning changes
Reference specific elements: Mention cart header, product items, quantity buttons, etc.
Start simple: Begin with basic changes and build up complexity
Test changes: Preview your cart after each generation to see the results
Refine prompts: If the result isn't quite right, try rephrasing your request. Describe how things are currently looking and how they should be changed.
EliteCart uses two main types of CSS classes:
.ec-
)These target specific cart elements and are preferred for precise customization:
.ec-cart-header
- Cart title and header area
.ec-cart-item
- Individual product rows
.ec-quantity-input
- Quantity selector buttons
.ec-checkout-button
- Main checkout button
And many more...
.tw-
)These are utility classes used for global styling:
.tw-text-lg
- Text sizing
.tw-bg-blue-500
- Background colors
.tw-rounded-lg
- Border radius
.tw-shadow-md
- Drop shadows
The AI automatically chooses the most appropriate classes for your requests.
AI Generation Fails
Check that your prompt is descriptive enough
Ensure you're connected to the internet
Try simplifying your request
Results Don't Match Expectations
Refine your prompt with more specific details
Try the "Modify existing" option if you want to build on current styles
Break complex requests into smaller, simpler prompts
This is the most important troubleshooting scenario: If your cart preview in the EliteCart admin shows exactly what you want, but the live cart on your website looks different or broken, this indicates a style conflict issue.
What's happening: Your theme or another app is loading CSS styles that override the EliteCart styles. Even though the HTML structure is correct (which is why the preview works), external styles are interfering with your custom CSS.
How to identify this:
The cart preview in EliteCart admin looks perfect
The live cart on your frontend looks different, broken, or reverted to old styling
Styles may appear to be "fighting" each other
Elements may have incorrect colors, sizing, or positioning.
How to fix this:
Use more specific CSS selectors: Instead of .ec-button
, try #EliteCartContainer .ec-button
Add !important
declarations: Force your styles to take priority: color: blue !important;
Increase CSS specificity: Use more detailed selectors like .ec-cart-container .ec-cart-item .ec-button
Contact support: We can help identify which styles are conflicting and provide specific overrides
Why this happens: Shopify themes sometimes use very specific selectors to target rather generic elements. This is bad practice (precisely because it breaks other things in your store). This is invisible in the HTML structure but breaks the visual appearance.
Prevention: Always test changes on your live store, not just in the preview, especially after installing new apps or updating your theme.
The AI considers existing styles, but conflicts can still occur
Use the preview to test changes before saving
Consider starting from scratch if there are too many conflicts
CSS generation typically takes less than less than 5 seconds, but can take longer in some cases.
No real impact on your cart's loading speed. Css is executed efficiently and quickly by the browser. You don’t ned to be afraid of it slowing down your store.
Preview First: Always preview changes in the cart designer before publishing
Test on Live Store: Check your live cart, not just the preview, to catch style conflicts
Save Backups: Keep copies of CSS that works well
Iterate Gradually: Make incremental improvements rather than dramatic overhauls
Test on Mobile: Ensure your changes work well on all device sizes
Keep It Simple: Start with basic styling before moving to complex designs
Need more help? Our support team is available via chat to help you make the most of the AI CSS generator. We're here to ensure your cart design perfectly matches your brand vision.