bulma- prefix to all class names, helping you avoid CSS conflicts when using Bulma alongside other CSS frameworks or existing codebases.
Overview
When integrating Bulma into an existing project or using it alongside other CSS frameworks, class name conflicts can occur. The prefixed version solves this by addingbulma- to the beginning of every Bulma class name.
File Structure
The prefixed version is available as:bulma- prefix:
How It Works
The prefixed version uses Sass’s@use rule with configuration to apply the prefix to all generated class names. This means every Bulma class will have the bulma- prefix.
Class Name Examples
Installation
Import the prefixed version in your SCSS file:Benefits
No Conflicts
Avoid class name conflicts with other CSS frameworks or existing styles.
Clear Origin
Easily identify which styles come from Bulma in your HTML.
Safe Integration
Safely integrate Bulma into legacy projects without breaking existing styles.
Multiple Frameworks
Use Bulma alongside Bootstrap, Tailwind, or other CSS frameworks.
When to Use
Consider using the prefixed version when:- Integrating Bulma into an existing project with established CSS
- Using multiple CSS frameworks in the same project
- You have generic class names (like
.button,.container) that conflict with Bulma - Working on a large codebase where clarity about style origins is important
- Migrating gradually from another CSS framework to Bulma
Example Usage
Button Component
Grid Layout
Form Elements
Considerations
The prefix applies to all Bulma classes, including elements, components, layouts, and helpers.
Comparison
| Feature | Standard Bulma | Prefixed Bulma |
|---|---|---|
| All features | ✓ | ✓ |
| Class prefix | None | bulma- |
| Risk of conflicts | Higher | Lower |
| Verbosity | Lower | Higher |
| Integration ease | May conflict | Conflict-free |
