Top Related Projects
A tiny modern CSS reset
A drop-in collection of CSS styles to make simple websites just a little nicer
MVP.css — Minimalist classless CSS stylesheet for HTML elements
Simple.css is a CSS template that allows you to make a good looking website really quickly.
A classless CSS framework to write modern websites using only HTML.
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Quick Overview
Sakura is a minimal, classless CSS framework that aims to provide a clean and elegant default style for HTML elements. It's designed to be lightweight, responsive, and easy to use, requiring no additional classes or complex setup.
Pros
- Extremely lightweight (less than 2kb gzipped)
- No classes required, works with semantic HTML
- Easy to customize and extend
- Cross-browser compatible
Cons
- Limited styling options compared to larger frameworks
- May require additional CSS for more complex layouts
- Not suitable for projects requiring extensive UI components
- Limited documentation and examples
Code Examples
To use Sakura, simply include the CSS file in your HTML:
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css">
Alternatively, you can use the dark theme:
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura-dark.css" type="text/css">
For those who prefer to use a CSS preprocessor, Sakura is also available as a SCSS file:
@import "sakura.scss";
Getting Started
To get started with Sakura, follow these simple steps:
-
Add the Sakura CSS to your HTML file:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Sakura Website</title> <link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css"> </head> <body> <h1>Welcome to My Sakura Website</h1> <p>This is a simple example using Sakura CSS framework.</p> </body> </html>
-
Start writing your content using semantic HTML. Sakura will automatically style your elements without the need for additional classes.
-
Customize the styles by overriding Sakura's CSS variables or adding your own CSS rules as needed.
Competitor Comparisons
A tiny modern CSS reset
Pros of minireset.css
- Extremely lightweight and minimalistic, focusing solely on resetting default styles
- Provides a clean slate for custom styling without imposing any design choices
- Easy to integrate into existing projects due to its small size and focused purpose
Cons of minireset.css
- Lacks pre-styled elements, requiring more work to achieve a polished look
- Does not provide any responsive design features or utility classes
- May require additional CSS frameworks or custom styling for complex layouts
Code Comparison
minireset.css:
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
}
sakura:
html {
font-size: 62.5%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
body {
font-size: 1.8rem;
line-height: 1.618;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
The code comparison shows that minireset.css focuses on resetting default styles, while sakura provides a more opinionated and styled base for web projects.
A drop-in collection of CSS styles to make simple websites just a little nicer
Pros of Water.css
- More comprehensive set of styles, covering a wider range of HTML elements
- Includes multiple themes (light and dark) out of the box
- Actively maintained with more recent updates
Cons of Water.css
- Larger file size, potentially impacting page load times
- More opinionated styling, which may require more overrides for customization
- Less focus on minimalism compared to Sakura
Code Comparison
Sakura:
html {
font-size: 62.5%;
font-family: serif;
}
body {
font-size: 1.8rem;
line-height: 1.618;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
Water.css:
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
line-height: 1.4;
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
color: #363636;
background: #fff;
text-rendering: optimizeLegibility;
}
Both CSS frameworks aim to provide simple, classless styling for HTML elements. Sakura focuses on minimalism and readability, while Water.css offers more comprehensive styling options and themes. The code comparison shows differences in font choices, line height, and overall layout approach.
MVP.css — Minimalist classless CSS stylesheet for HTML elements
Pros of MVP
- More comprehensive set of UI components and layouts
- Includes dark mode support out of the box
- Offers additional customization options through CSS variables
Cons of MVP
- Larger file size due to more features (8KB vs 2KB for Sakura)
- More opinionated design, which may require more overrides for custom styling
- Slightly more complex structure, potentially harder to understand for beginners
Code Comparison
MVP:
:root {
--color-background: #fff;
--color-text: #333;
--font-family: system-ui, sans-serif;
}
Sakura:
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
line-height: 1.8;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
Both MVP and Sakura are minimal CSS frameworks, but they take different approaches. MVP offers more features and customization options, making it suitable for a wider range of projects. Sakura, on the other hand, focuses on simplicity and a smaller footprint, which can be ideal for quick prototypes or minimalist designs. The choice between the two depends on the specific needs of your project and personal preferences.
Simple.css is a CSS template that allows you to make a good looking website really quickly.
Pros of Simple.css
- More comprehensive documentation and examples
- Includes utility classes for additional customization
- Actively maintained with regular updates
Cons of Simple.css
- Larger file size compared to Sakura
- More opinionated design choices
- Requires additional classes for some styling
Code Comparison
Sakura:
html {
font-size: 62.5%;
font-family: serif;
}
body {
font-size: 1.8rem;
line-height: 1.618;
}
Simple.css:
:root {
--font-family: system-ui, -apple-system, sans-serif;
--font-size: 1.15rem;
--line-height: 1.5;
}
body {
font-family: var(--font-family);
}
Both Sakura and Simple.css are minimalist CSS frameworks designed to provide a clean, readable default style for HTML elements. Sakura focuses on simplicity and a classic serif look, while Simple.css offers a more modern appearance with sans-serif fonts and additional customization options.
Sakura's approach is more lightweight and requires less markup, making it ideal for quick prototypes or simple static sites. Simple.css, on the other hand, provides more flexibility and utility classes, which can be beneficial for more complex projects or those requiring specific design adjustments.
The code comparison highlights the different approaches to font styling. Sakura uses direct CSS properties, while Simple.css employs CSS variables for easier customization. Both frameworks aim to improve readability and provide a solid foundation for web projects, with Simple.css offering more features at the cost of increased complexity.
A classless CSS framework to write modern websites using only HTML.
Pros of new.css
- Smaller file size, resulting in faster load times
- More extensive color palette and customization options
- Includes additional utility classes for common styling needs
Cons of new.css
- Less opinionated design, requiring more manual styling for a polished look
- Fewer pre-styled elements compared to Sakura
- May require more effort to achieve a cohesive design across different elements
Code Comparison
Sakura:
html {
font-size: 62.5%;
font-family: serif;
}
body {
font-size: 1.8rem;
line-height: 1.618;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
new.css:
:root {
--nc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--nc-font-mono: Consolas, monaco, 'Ubuntu Mono', 'Liberation Mono', 'Courier New', Courier, monospace;
--nc-tx-1: #000000;
--nc-tx-2: #1A1A1A;
--nc-bg-1: #FFFFFF;
--nc-bg-2: #F6F8FA;
--nc-bg-3: #E5E7EB;
--nc-lk-1: #0070F3;
--nc-lk-2: #0366D6;
--nc-lk-tx: #FFFFFF;
--nc-ac-1: #79FFE1;
--nc-ac-tx: #0C4047;
}
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Pros of Tacit
- More comprehensive set of CSS rules, covering a wider range of HTML elements
- Includes responsive design features for better mobile compatibility
- Offers more customization options through CSS variables
Cons of Tacit
- Larger file size, potentially impacting page load times
- More opinionated design choices, which may require more overrides
- Steeper learning curve due to its more complex structure
Code Comparison
Sakura:
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
line-height: 1.8;
max-width: 38em;
margin: auto;
color: #4a4a4a;
background-color: #f9f9f9;
padding: 13px;
}
Tacit:
body {
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
line-height: 1.5;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
Both projects aim to provide classless CSS frameworks for quick and easy styling of HTML documents. Sakura focuses on simplicity and minimalism, while Tacit offers a more feature-rich approach with additional customization options. The choice between the two depends on the specific needs of the project and the desired level of control over the styling.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
sakura: a minimal, classless CSS framework / theme.
[Go to GitHub repository]
The perfect blossom is a rare thing. You could spend your life looking for one, and it would not be a wasted life.
Just drop sakura.css
into any webpage and go from an ugly-looking 1900s
website to a pretty, modern website in literally 0 seconds.
It's easy to customize and build on top of sakura.
Sakura supports extremely easy theming using variables for duotone color
scheming. It comes with several existing themes, which can be found in the css
folder of this repository.
Demo
Compare a live page WITH and WITHOUT sakura.
Also, my blog is a nice place to check sakura in action with heavy text (it has a "change theme" button on the top as well):
Bookmark
Don't want to develop using sakura but instead want to use it on websites with outdated 90s design (i.e. no CSS)?
If so, enable sakura on any website using the following instructions:
Why? - Reasons to use sakura
How exactly does sakura help you? I had a discussion about this on the reddit thread.
- Just drop it in, even on existing HTML content, to get a pretty-looking website (everything "just works")
- Quick prototyping, especially when working on backend sites and can't yet be bothered to fidget with CSS/HTML
- Building a quick (but pretty) site/blog for your best friend or aunt!
- No need to remember tons of different class names for every other CSS framework
- Works amazingly with markdown-generated HTML pages (eliminates the need for
hacks like including
.img img-responsive
in<img></img>
tags generated from markdown-parser - Wonderful for people who aren't really good or interested in design as sakura is nothing but a set of reasonable defaults
Installation
CDN (recommended):
-
Simply add this in your
<head>
tag:<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sakura.css/css/sakura.css" type="text/css">
Manually:
-
Download the file:
wget "https://raw.githubusercontent.com/oxalorg/sakura/master/css/sakura.css"
OR download directly: sakura.css
-
Link it from HTML:
<link rel="stylesheet" href="sakura.css" type="text/css">
Package Manager:
-
Install from npm:
npm install sakura.css
-
Install from Yarn:
yarn add sakura.css
(Optional) but recommended to use normalize.css to reset before using sakura.
Sites using sakura
- https://oxal.org/blog/
- http://computableverse.com
- https://gaiwan.co
- https://www.softwareyoga.com/
- https://www.taazakitchen.com/
- https://audioviz.surge.sh/vex.html
- https://chocopy.org
- https://wasmbyexample.dev/
- https://ninjas.cl/
- https://minidown.atusy.net
- https://jvanelian.dev
- https://mousikofidi.info/
- https://ocamlbook.org
- https://monkeyjunglejuice.github.io
- https://reinforce.moe/about-en.md
- https://4clojure.oxal.org/
- https://yunru.se
- https://articleparser.vercel.app/
- https://solely.gay
- https://bluelander.bearblog.dev/
- https://onefetch.dev/
- https://nonwiz.dev/
- https://frost.kiwi/
If you're using sakura, please let me know or make a pull request adding in
your name. I would be super happy!! ^_^
Theming
You can make your own themes by overriding some variables for colors.
Here is an example file: ./scss/sakura-earthly.scss
:
/* Duotone color scheming:
Uses blossom as the revealing/stark color
Uses fade as the more prominent color
*/
$color-blossom: #338618;
$color-fade: #5e5e5e;
/* bg color is used for the background of the page
bg-alt is used for code-blocks etc
*/
$color-bg: #f9f9f9;
$color-bg-alt: #C7E3BE;
/* color of all the text on the page */
$color-text: #4a4a4a;
$font-size-base: 1.8rem;
@import "main";
Dark mode
Add a media attribute as follows to choose a darker theme for dark mode.
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" media="screen" />
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura-dark.css" media="screen and (prefers-color-scheme: dark)" />
Contributing
Please have a look at the instructions.
Contributors
- Bookmarklet was added by Zhouzi.
- The image is credited to Deedster.
- Vite previews added by @spenserblack SpenserBlack.
Share some <3
Between our two lives there is also the life of the cherry blossom.
- Basho Matsuo
Please leave a star. :)
Top Related Projects
A tiny modern CSS reset
A drop-in collection of CSS styles to make simple websites just a little nicer
MVP.css — Minimalist classless CSS stylesheet for HTML elements
Simple.css is a CSS template that allows you to make a good looking website really quickly.
A classless CSS framework to write modern websites using only HTML.
CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot