CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Overview

Natural Selection

Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define global styles. Natural Selection aims to provide a best-practice CSS boilerplate that can be used to start projects. It tries to encourage semantic HTML and the handling of accessibility concerns.

Natural Selection almost exclusively uses generic element, attribute, and pseudo-class selectors. But there are also very few opinionated selectors that rely on classes. See the comments in the CSS file for more information. The selector grouping is loosely based on MDN's HTML elements reference. Ordering is roughly based on how common certain elements or element groups are.

Instructions

  1. Download the raw CSS
  2. Move it into your code base
  3. Evolve it according to your needs

Browser Compatibility

All modern browsers and almost all browsers still in use today should be more than capable of handling Natural Selection.

Natural Selection is mostly based on element, attribute, and pseudo-class selectors. All of them have been in the CSS specifications for ages. Though, there are some selectors that might not yet be widely supported. In that case, Natural Selection provides ways to detect and/or overcome lacking browser support.

Contribute

Please create an issue when you have a suggestion. Note that the goal of this project is to provide a useful and minimal boilerplate for global CSS styling. It is not the goal to add every single element or every possible element/attribute/pseudo-class combination.

Questions and Answers

Why is this called "Natural Selection"?
This is a collection of CSS selectors. And given the limited number of HTML elements and attributes, the list came about quite naturally.

Why are there no selectors for div and span?
Both div and span are very generic. It does not really make sense to apply any global styling to them. If it does make sense in your specific use case, just add them yourself.

What is element X used for?
Please read MDN's HTML elements reference.

What element(s) are matched by the selector X?
Please read MDN's CSS selectors reference.

You might also like...

OrganiCSS is a collection of mixins for writing logical CSS in different pre-processors and libraries.

OrganiCSS is a collection of mixins for writing logical CSS in different pre-processors and libraries.

OrganiCSS is a collection of mixins and functions to support writing progressively-enhanced logical CSS in many different flavors. Getting Started To

Jul 20, 2022

Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development

Skeleton Skeleton is a simple, responsive boilerplate to kickstart any responsive project. Check out http://getskeleton.com for documentation and deta

Dec 29, 2022

βš™οΈ Static site boilerplate. Using Gulp, PugJS, and Sass.

πŸ” Alaska | Static-site Boilerplate ⚑ Fastest way to build HTML and CSS static sites. You don't have to learn complicated tools to build simple websit

Sep 10, 2022

Landing page starter

Landing page starter

πŸ‘‹ Fresh Fresh is a free landing page starter built by cssninjaStudio. ✌️ preview Check out the live demo by clicking here. Fresh is built with Bulma

Dec 23, 2022

A Github Pages template for nonprofits seeking a starter website. Includes online donations and newsletter signup.

A Github Pages template for nonprofits seeking a starter website. Includes online donations and newsletter signup.

A Free Website Template for Nonprofits We want to help introduce the nonprofit community to the powerful world of open source development. Just follow

Dec 16, 2022

This is a TailwindCSS, Next.js, medusa starter template

This is a TailwindCSS, Next.js, medusa starter template

This is a TailwindCSS, Next.js, medusa starter template. Feel free to use it, fork it and star it πŸ₯³πŸ™Œ

May 5, 2022

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

Fluent UI Web πŸŽ‰ πŸŽ‰ πŸŽ‰ Version 8 of @fluentui/react is now available on npm! πŸŽ‰ πŸŽ‰ πŸŽ‰ See the release notes for more info, and please file an issue if

Jan 4, 2023

A collection of CSS3 buttons implemented in Sass.

CSS3 Buttons This is a collection of buttons that show what is possible using CSS3 and other advanced techniques, while maintaining the simplest possi

Nov 8, 2022

Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css A CSS Reset/Normalizer Reseter.css is an awesome CSS reset for a website. It is a great tool for any web designer. Reseter.css resets all

Jan 2, 2023
Owner
FrontAid CMS
FrontAid CMS
A simple game where you can draw art similar to pixel art, or practice Kufic Calligraphy.

Etch-A-Sketch Where to try it? https://jee-el.github.io/etch-a-sketch/ What's the game about? It's a sketching website or game where you can : Draw wh

Lhoussaine Ghallou 6 Oct 27, 2022
Now UI Kit Bootstrap 4 - Designed by Invision. Coded by Creative Tim

Now UI Kit Now UI Kit is a responsive Bootstrap 4 kit provided for free by Invision and Creative Tim. It is a beautiful cross-platform UI kit featurin

Creative Tim 1.7k Jan 7, 2023
Tabler is free and open-source HTML Dashboard UI Kit built on Bootstrap

A premium and open source dashboard template with a responsive and high-quality UI. Preview Tabler is fully responsive and compatible with all modern

Tabler 32.6k Jan 9, 2023
A best-practices CSS foundation

sanitize.css sanitize.css is a CSS library that provides consistent, cross-browser default styling of HTML elements alongside useful defaults. It is d

CSS Tools 5k Jan 2, 2023
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress πŸ’…

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress ?? Looking for v5? The master branch is un

styled-components 38k Dec 31, 2022
A modern, responsive CSS boilerplate library to kickstart any web-based project.

Peacock CSS Peacock is a modern, responsive CSS boilerplate library to kickstart any web-based project. It is simple, lightweight and it contains all

Binary Birds 8 Jan 23, 2022
Tailwind CSS Starter Template - Landing Page

Tailwind Toolbox - Landing Page Template Landing Page is an open source, generic landing page template for Tailwind CSS created by Tailwind Toolbox. G

Tailwind Toolbox 908 Jan 8, 2023
A starter CSS framework that actually looks good.

Mustard UI Mustard is a starter CSS framework that actually looks good. Getting Started Mustard UI is currently in release v1.0. Try it out today and

Kyle Logue 1k Dec 28, 2022
CSSHell - Collection of common CSS mistakes, and how to fix them

CSS Hell - To Hell with bad CSS! Collection of common CSS mistakes, and how to f

StefΓ‘nia PΓ©ter 181 Nov 4, 2022
Giggy is a collection of a few fun jokes related to Coding & Dark Humor - Created using HTML, JavaScript, CSS & Webpack.

Giggy A Collection of some of the best jokes. This is a Web Application with some jokes related to coding & Dark Humor. Created with data from the Jok

Awais Amjed 7 Jul 28, 2022