Why build with Bonsai
Bonsai CSS is a super lightweight, fully responsive, utility complete framework. All you need to build beautifully crafted web interfaces with ease.
- A utility complete CSS framework solution
- Classless base styling of semantic HTML elements
- All packed inside a gzipped size of just 8kb
- Drop n Build - No compiling required
Jane Doe
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Viktor Jones
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Marcia Stanley
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Giovanni Santana
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Sarah Drake
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque volutpat mattis eros.
Be Inspired
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque volutpat mattis eros.
Quisque volutpat mattis eros.
New Beginnings
Welcome
Quisque imperdiet
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque volutpat mattis eros.
Quisque volutpat
€30.00
Lorem ipsum dolor sit amet
€90.00
Consectetuer adipiscing elit
€60.00
Quisque volutpat mattis
€120.00
Quisque volutpat
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nunc dignissim risus
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Cras ornare tristique
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Praesent placerat
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Join us today!
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros.
Lorem ipsum dolor sit amet
January 18, 2020
Ut enim ad minim veniam
March 24, 2020
Nemo enim ipsam voluptatem
Arpil 04, 2020
Questionaire
Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.
CULTURE
Lorem ipsum dolor
5.0 (48 Reviews)Our site uses cookies. Learn more about our use of cookies: Cookie policy
Be Creative
Lorem ipsum dolor sit amet
Beautiful Designs
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Explicabo ex fugiat quisquam.
A Perfect Place
Get creative with Bonsai CSS
Classless Base Element Styling
Before you even start adding class or style attributes, Bonsai CSS applies a base styling to your semantic HTML elements. Simply load Bonsai CSS in to your project and your base HTML elements will be beautifully styled with zero effort.
Utility Complete CSS
In terms of CSS frameworks, utilities commonly refer to a CSS class which applies a single CSS property to an element. For example a class name of .bg-green
would apply background-color: green
to that element. A Utility Complete framework provide a complete set of utilities for the majority of CSS properties.
- Super quick prototyping without leaving your HTML
- CSS size remains constant as your project grows
There is nothing new about the concept of utility complete CSS and today you will find any number of utility first frameworks to pick from. What is unique about Bonsai however, is how these utilities are implemented. Traditionally utility complete frameworks include a rule for every common CSS property/value combination. Not only does this result in an incredibly large CSS file size it also means you are restricted to a set number of property/value combinations as defined by the framework developers. Bonsai CSS uses a different approach. Instead utilities are defined by just the property and you the developer define the value. Not only is the resulting CSS a fraction of the size, you also have full access to the CSS spec for each property.
Style based utilities
<div style="--bg:var(--dark)"><div>
<div style="--bg:#2A2A2A"><div>
<div style="--bg:rgb(42,42,42)"><div>
<div style="--bg:rgba(0,0,0,.8)"><div>
Responsive design and media queries
Where relevant utilities can be applied conditionally to each screensize. This allows you to apply utilities to specific screen size making responsive design a walk in the park.
By default there are four breakpoints set in correspondence with the most common device resolutions.
/* Small '-sm' */
@media (min-width: 640px) { ... }
/* Medium '-md' */
@media (min-width: 768px) { ... }
/* Large '-lg' */
@media (min-width: 1024px) { ... }
/* Extra Large '-xl' */
@media (min-width: 1280px) { ... }
To assign a utility to a set screensize breakpoint simply prepend with a -
followed by the breakpoint shorthand name. Media queries by default use a mobile-first approach, which as it sounds is designing for the smallest screen and working your way up.
Consider the following example where --d
is the Bonsai utility for the display
CSS property. Button is display:block
by default. display:none
from medium size screens up.
<button style="--d:block; --d-md:none">Only visible on small screens</button>