Convert Figma logo to code with AI

xz logonew.css

A classless CSS framework to write modern websites using only HTML.

3,946
127
3,946
40

Top Related Projects

4,952

MVP.css — Minimalist classless CSS stylesheet for HTML elements

A drop-in collection of CSS styles to make simple websites just a little nicer

Drop-in switcher for previewing minimal CSS frameworks

Simple.css is a CSS template that allows you to make a good looking website really quickly.

4,104

:cherry_blossom: a minimal css framework/theme.

1,696

CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages

Quick Overview

new.css is a classless CSS framework that provides a clean, modern look for websites without requiring any classes. It's designed to be lightweight and easy to use, making it ideal for simple projects or as a starting point for more complex designs.

Pros

  • Extremely lightweight (only 4.5kb minified and gzipped)
  • No classes required, works with semantic HTML
  • Automatically adapts to light and dark modes
  • Responsive design out of the box

Cons

  • Limited customization options compared to class-based frameworks
  • May not be suitable for complex layouts or designs
  • Lack of pre-built components (e.g., navigation bars, cards)
  • Potential for conflicts with existing styles in larger projects

Getting Started

To use new.css in your project, simply include the following line in the <head> of your HTML document:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css">

Alternatively, you can download the CSS file and host it locally:

<link rel="stylesheet" href="path/to/new.min.css">

Once included, new.css will automatically style your semantic HTML elements without requiring any additional classes or modifications to your markup.

Competitor Comparisons

4,952

MVP.css — Minimalist classless CSS stylesheet for HTML elements

Pros of MVP

  • More comprehensive set of pre-styled elements, including forms and tables
  • Includes dark mode support out of the box
  • Offers more customization options through CSS variables

Cons of MVP

  • Larger file size (7.7KB vs 4.5KB for new.css)
  • More opinionated design, which may require more overrides for custom styling
  • Slightly more complex structure, potentially making it harder to understand and modify

Code Comparison

MVP:

:root {
  --border-radius: 5px;
  --box-shadow: 2px 2px 10px;
  --color: #118bee;
  --color-accent: #118bee15;
  --color-bg: #fff;
  --color-bg-secondary: #e9e9e9;
  --color-secondary: #920de9;
  --color-secondary-accent: #920de90b;
  --color-shadow: #f4f4f4;
  --color-text: #000;
  --color-text-secondary: #999;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --hover-brightness: 1.2;
  --justify-important: center;
  --justify-normal: left;
  --line-height: 1.5;
  --width-card: 285px;
  --width-card-medium: 460px;
  --width-card-wide: 800px;
  --width-content: 1080px;
}

new.css:

:root {
  --nc-font-sans: -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;

  /* Light theme */
  --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;
}

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 dark mode support out of the box
  • Offers multiple themes (light, dark, and automatic)

Cons of Water.css

  • Larger file size, which may impact page load times
  • More opinionated design choices, potentially requiring more customization
  • Less focus on minimalism compared to New.css

Code Comparison

New.css:

body {
  max-width: 60ch;
  padding: 2ch;
  margin: auto;
}

Water.css:

body {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

Summary

Water.css offers a more feature-rich and comprehensive styling solution, including dark mode and multiple themes. However, this comes at the cost of a larger file size and more opinionated design choices. New.css, on the other hand, focuses on minimalism and simplicity, resulting in a smaller file size but with fewer built-in features. The code comparison shows that Water.css provides more detailed default styles, while New.css opts for a more streamlined approach.

Drop-in switcher for previewing minimal CSS frameworks

Pros of dropin-minimal-css

  • Offers multiple themes and styles, providing more flexibility
  • Includes a theme switcher for easy customization
  • Smaller file size for individual themes, potentially faster loading

Cons of dropin-minimal-css

  • Less comprehensive default styling compared to new.css
  • May require more manual adjustments for complex layouts
  • Documentation is not as extensive as new.css

Code Comparison

new.css:

body {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

dropin-minimal-css (example from "sakura" theme):

body {
  max-width: 38em;
  margin: auto;
  padding: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
}

Both projects aim to provide minimal CSS frameworks for quick and easy styling of web pages. new.css focuses on a single, opinionated style with more comprehensive default styling, while dropin-minimal-css offers multiple themes with a more minimalist approach. The code comparison shows similarities in basic layout principles, but dropin-minimal-css tends to use more specific font stacks and slightly different default values for margins and padding.

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 New.css
  • More opinionated design choices, potentially less flexible
  • Requires more markup for certain elements

Code Comparison

Simple.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: #ffffff;
}

New.css:

:root {
  --nc-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 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-bg-1: #FFFFFF;
  --nc-bg-2: #F6F8FA;
}

Both CSS frameworks aim to provide simple, classless styling for HTML elements. Simple.css offers more features and customization options, while New.css focuses on minimalism and smaller file size. The choice between the two depends on project requirements and personal preferences.

4,104

:cherry_blossom: a minimal css framework/theme.

Pros of Sakura

  • More customizable with variables for colors and fonts
  • Includes additional elements like blockquotes and code blocks
  • Smaller file size (8.2 KB vs 10.9 KB for New.css)

Cons of Sakura

  • Less modern and minimalist design compared to New.css
  • Fewer pre-styled elements and layout options
  • Limited browser support (no IE11 compatibility)

Code Comparison

Sakura:

html {
  font-size: 62.5%;
  font-family: var(--font-family-base);
}

body {
  font-size: 1.8rem;
  line-height: 1.618;
  max-width: 38em;
  margin: auto;
  color: var(--color-text);
  background-color: var(--color-bg);
  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;
}

Both stylesheets aim to provide simple, classless CSS frameworks for quick and easy styling of HTML documents. Sakura offers more customization options through variables, while New.css focuses on a modern, minimalist design with a wider range of pre-styled elements.

1,696

CSS framework for dummies, without a single CSS class: nicely renders properly formatted HTML5 pages

Pros of Tacit

  • More comprehensive styling, covering a wider range of HTML elements
  • Includes responsive design features for better mobile compatibility
  • Offers a more opinionated and polished look out of the box

Cons of Tacit

  • Larger file size, which may impact page load times
  • Less customizable due to its more opinionated nature
  • May require overriding styles for specific design needs

Code Comparison

Tacit:

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  max-width: 50em;
  margin: 0 auto;
  padding: 1em;
}

new.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;
}

Both frameworks aim to provide simple, classless CSS styling for HTML documents. Tacit offers a more comprehensive set of styles with responsive design features, while new.css focuses on minimalism and ease of customization. The code comparison shows similar approaches to basic body styling, with slight differences in font stacks, line heights, and layout parameters.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

new.css

Discord GitHub stars

new.css

A classless CSS framework to write modern websites using only HTML. It weighs 4.8kb.

All it does is set some sensible defaults and styles your HTML to look reasonable. It's perfect for:

  • A dead-simple blog
  • Collecting your most used links
  • Making a simple "about me" site
  • Rendering markdown-generated HTML

Demo: newcss.net


Table of Contents

  • Usage
  • Themes
    • Theme Library
    • Customizing Themes
  • FAQ
  • Made with new.css
  • Sponsors
  • Support

Usage

HTML

Add this line to the end of your HTML's <head>:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1/new.min.css">

If you'd like the font Inter as well (recommended), add this line as well:

<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css">

npm

npm i @exampledev/new.css

Yarn

yarn add @exampledev/new.css

Themes

new.css uses a color palette that can be easily customized. These are declared as a CSS variable in the :root attribute.

Theme Library

See pre-made themes at newcss.net/themes.

Customizing Themes

Information is available on the wiki.

FAQ

Why should I use this instead of (popular framework)?

new.css wasn't made to be a true framework. It's made for rapidly prototyping your raw HTML or setting up a good-looking simple HTML site with zero configuration.

Does this work with (platform/service)?

new.css was designed to work with nothing but raw HTML, but some awesome community members are porting it to other platforms.

Check if your platform or service supports custom CSS. If it does, it'll probably work. You're welcome to ask the community as well.

Sponsors

Special Thanks




Powered by Vercel