Top Related Projects
Modern CSS framework based on Flexbox
Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development
A minimalist CSS framework.
Spectre.css - A Lightweight, Responsive and Modern CSS Framework
A drop-in collection of CSS styles to make simple websites just a little nicer
MVP.css — Minimalist classless CSS stylesheet for HTML elements
Quick Overview
Marx is a classless CSS reset and boilerplate that provides a minimalist and opinionated starting point for web development projects. It aims to create a consistent and visually appealing base style without the need for complex class structures, making it easy to build upon for custom designs.
Pros
- Lightweight and minimal, with a small file size
- Easy to implement and use, requiring no additional classes
- Provides a clean and modern default appearance for HTML elements
- Responsive and mobile-friendly out of the box
Cons
- Limited customization options without modifying the source CSS
- May not be suitable for complex layouts or designs that require extensive custom styling
- Some developers may prefer more opinionated frameworks with pre-built components
- Lack of JavaScript components or interactive elements
Code Examples
- Basic HTML structure with Marx:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marx Example</title>
<link rel="stylesheet" href="https://unpkg.com/marx-css/css/marx.min.css">
</head>
<body>
<main>
<h1>Welcome to Marx</h1>
<p>This is a simple example using Marx CSS.</p>
</main>
</body>
</html>
- Form styling with Marx:
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<button type="submit">Submit</button>
</form>
- Responsive grid layout using Marx:
<div class="row">
<div class="col">
<h2>Column 1</h2>
<p>Content for the first column.</p>
</div>
<div class="col">
<h2>Column 2</h2>
<p>Content for the second column.</p>
</div>
</div>
Getting Started
To use Marx in your project, simply include the CSS file in your HTML:
<link rel="stylesheet" href="https://unpkg.com/marx-css/css/marx.min.css">
Alternatively, you can install Marx using npm:
npm install marx-css
Then import it in your JavaScript file:
import 'marx-css/css/marx.min.css';
Once included, Marx will automatically style your HTML elements without the need for additional classes.
Competitor Comparisons
Modern CSS framework based on Flexbox
Pros of Bulma
- More comprehensive and feature-rich CSS framework
- Larger community and ecosystem with extensive documentation
- Modular architecture allowing for customization and partial imports
Cons of Bulma
- Larger file size and potentially slower load times
- Steeper learning curve due to more complex class structure
- May require additional customization to achieve a unique design
Code Comparison
Marx:
body {
color: #333;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
line-height: 1.5;
margin: 0 auto;
max-width: 50em;
padding: 1em;
}
Bulma:
.container {
flex-grow: 1;
margin: 0 auto;
position: relative;
width: auto;
}
@media screen and (min-width: 1024px) {
.container {
max-width: 960px;
}
}
Marx provides a simpler, opinionated default styling for basic HTML elements, while Bulma offers a more structured approach with customizable classes and responsive design features.
Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development
Pros of Skeleton
- Lighter weight and more minimalist, focusing on core layout and typography
- Includes a responsive grid system for easier layout creation
- Provides a mobile-first approach with breakpoints for different screen sizes
Cons of Skeleton
- Less comprehensive styling for form elements and buttons
- Fewer pre-styled components compared to Marx
- May require more custom CSS for complex designs
Code Comparison
Marx:
body {
color: #333;
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;
}
Skeleton:
body {
font-size: 1.5em;
line-height: 1.6;
font-weight: 400;
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #222;
}
Both frameworks provide basic styling for the body element, but Marx uses a more extensive system font stack, while Skeleton specifies a primary font (Raleway) with fallbacks. Marx also sets a slightly tighter line height compared to Skeleton.
A minimalist CSS framework.
Pros of Milligram
- Lighter weight (2kb gzipped) compared to Marx's larger file size
- More extensive documentation and examples
- Active development with more recent updates
Cons of Milligram
- Less opinionated design, requiring more custom styling
- Fewer pre-styled elements out of the box
- Lacks some accessibility features present in Marx
Code Comparison
Marx:
body {
color: #212121;
font-family: 'Arial', sans-serif;
line-height: 1.5;
margin: 0;
max-width: 100%;
}
Milligram:
body {
color: #606c76;
font-family: 'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 1.6em;
font-weight: 300;
letter-spacing: .01em;
line-height: 1.6;
}
Both frameworks provide minimal CSS styling, but Marx offers more opinionated defaults, while Milligram focuses on providing a lightweight foundation for custom designs. Marx includes more accessibility features and pre-styled elements, making it easier to create a functional website quickly. Milligram, on the other hand, offers a smaller file size and more flexibility for customization, but requires more effort to achieve a polished look. The choice between the two depends on project requirements and personal preferences for styling and development approach.
Spectre.css - A Lightweight, Responsive and Modern CSS Framework
Pros of Spectre
- More comprehensive framework with a wider range of UI components
- Better documentation and examples
- Actively maintained with regular updates
Cons of Spectre
- Larger file size, potentially impacting page load times
- Steeper learning curve due to more complex structure
- Less focused on minimalism compared to Marx
Code Comparison
Marx (CSS):
body {
color: #333;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1.6em;
line-height: 1.5;
margin: 0;
padding: 0;
}
Spectre (CSS):
.container {
margin-left: auto;
margin-right: auto;
padding-left: .4rem;
padding-right: .4rem;
width: 100%;
}
Marx focuses on basic styling for HTML elements, while Spectre provides more structured classes for layout and components. Marx aims for a classless approach, whereas Spectre relies on utility classes for customization.
Both frameworks offer responsive design, but Spectre provides more granular control through its grid system and utility classes. Marx is ideal for quick prototypes or simple projects, while Spectre is better suited for larger, more complex applications requiring a wider range of UI components and customization options.
A drop-in collection of CSS styles to make simple websites just a little nicer
Pros of Water.css
- Lighter weight (2.2KB vs 3.5KB for Marx)
- More customizable with multiple themes and dark mode support
- Actively maintained with recent updates
Cons of Water.css
- Less opinionated design, may require more custom styling
- Fewer pre-styled elements compared to Marx
- No built-in grid system
Code Comparison
Water.css:
body {
max-width: 800px;
margin: 20px auto;
padding: 0 10px;
font-family: sans-serif;
line-height: 1.5;
}
Marx:
body {
max-width: 960px;
margin: 0 auto;
padding: 1rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
line-height: 1.6;
}
Both CSS frameworks aim to provide simple, classless styling for HTML elements. Water.css focuses on lightweight, customizable designs with multiple themes, while Marx offers a more opinionated, feature-rich approach with a built-in grid system. Water.css is actively maintained and smaller in size, making it suitable for quick prototypes or minimalist designs. Marx, though slightly larger, provides more pre-styled elements and a consistent look out of the box, which may be preferable for certain projects.
MVP.css — Minimalist classless CSS stylesheet for HTML elements
Pros of MVP
- More comprehensive set of components and utilities
- Includes JavaScript functionality for interactive elements
- Offers a wider range of color options and themes
Cons of MVP
- Larger file size due to more features
- Steeper learning curve for beginners
- Less focused on minimalism compared to Marx
Code Comparison
Marx (CSS):
body {
color: #333;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
line-height: 1.5;
max-width: 50em;
margin: 0 auto;
padding: 1em;
}
MVP (CSS):
: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;
}
Both projects aim to provide minimal CSS frameworks, but MVP offers more features and customization options, while Marx focuses on simplicity and ease of use.
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
Marx
The classless CSS reset (perfect for Communists).
No JavaScript. No Classes. Just raw CSS.
Is Marx for you?
Marx is a CSS stylesheet to be used in any projects (namely small ones). If you don't need the weight of heavy frameworks or you would just like to make an edible website quickly, Marx is perfect for you. It can be used out of the minified box but it can also be customised and styled through the use of HTML classes.
Key features
- Built atop of Sanitize.css, meaning all browsers render consistently.
- Responsive and mobile-friendly.
- Clean, beautiful typography.
- Forms, tables, buttons and navigation.
- Zero classes, so it already works with your HTML.
- Drop-dead gorgeous.
- It just works.
Demo
Quick Start
Several quick start options are available:
- Install with NPM:
npm install marx-css
(recommended). - Use the latest Marx CDN
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://unpkg.com/marx-css/css/marx.min.css">
- Source code.
- Download the latest release.
- Clone the repo:
git clone https://github.com/mblode/marx.git
.
If you have cloned the repo or downloaded from .zip, there are a few steps you must take within the terminal:
- Change directory:
cd marx
. - Install node modules:
npm install
. - To run gulp:
gulp
.
Running Github Pages
The gh-pages branch is built using Jekyll and must therefore be install with gem install jekyll
.
- Checkout in to gh-pages:
git checkout gh-pages
. - Install marx dependency:
npm install
. - Run middleman:
bundle exec middleman serve
. - Open in browser:
localhost:4567
.
What's Included
These are the files that are generated from npm install marx-css
.
âââ LICENSE.md
âââ README.md
âââ css
â âââ marx.css
â âââ marx.min.css
â âââ marx.min.css.map
âââ gulpfile.js
âââ index.html
âââ package.json
âââ src
âââ _base.css
âââ _buttons.css
âââ _form.css
âââ _sanitize.css
âââ _tables.css
âââ _typography.css
âââ _variables.css
âââ marx.css
Documentation
Basic HTML Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Marx Template</title>
<!-- Marx CSS -->
<link rel="stylesheet" href="css/marx.min.css">
</head>
<body>
<!-- main is the container -->
<main>
<!-- Navigation -->
<nav>
<ul>
<li><a href="#"><b>First</b></a></li>
<li><a href="#">Second</a></li>
<li><a href="#">Third</a></li>
<li><a href="#">Fourth</a></li>
</ul>
</nav>
<!-- article -->
<article>
<h1>Article</h1>
</article>
<!-- aside -->
<aside>
<h1>Aside</h1>
</aside>
<!-- section -->
<section>
<h1>Section</h1>
</section>
<!-- footer -->
<footer>
<p>© Matthew Blode</p>
</footer>
</main>
</body>
</html>
Contributing to Marx
Pull requests are the way to go.
Creators
Matthew Blode
License
MIT © Matthew Blode
Top Related Projects
Modern CSS framework based on Flexbox
Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development
A minimalist CSS framework.
Spectre.css - A Lightweight, Responsive and Modern CSS Framework
A drop-in collection of CSS styles to make simple websites just a little nicer
MVP.css — Minimalist classless CSS stylesheet for HTML elements
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