├── LICENSE ├── README.md └── makefile /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Adam Kochanowicz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* 4 | 5 | - [Amadeus](#amadeus) 6 | - [Variables](#variables) 7 | - [How it works](#how-it-works) 8 | - [Syntax](#syntax) 9 | - [Name syntax](#name-syntax) 10 | - [Examples](#examples) 11 | - [Default CSS Properties, Values and HTML Tags](#default-css-properties-values-and-html-tags) 12 | - [Custom modules](#custom-modules) 13 | - [Non-CSS values](#non-css-values) 14 | - [Grouping](#grouping) 15 | - [Defaults](#defaults) 16 | - [Sizing](#sizing) 17 | - [Color](#color) 18 | - [Logic](#logic) 19 | - [Duplicate properties](#duplicate-properties) 20 | - [Separate properties](#separate-properties) 21 | - [Properties with identical prefixes](#properties-with-identical-prefixes) 22 | - [Selectors](#selectors) 23 | - [Why replace BEM?](#why-replace-bem) 24 | - [What does it do?](#what-does-it-do) 25 | - [How to use](#how-to-use) 26 | - [Controller/Action](#controlleraction) 27 | - [Blocks](#blocks) 28 | - [Component](#component) 29 | - [Element](#element) 30 | - [Formatting](#formatting) 31 | - [Example](#example) 32 | - [Nesting rules](#nesting-rules) 33 | - [Multiple selectors](#multiple-selectors) 34 | - [Ordering](#ordering) 35 | - [Scoped variables](#scoped-variables) 36 | - [Regular attributes](#regular-attributes) 37 | - [Subselectors](#subselectors) 38 | - [Appended selectors](#appended-selectors) 39 | - [Media queries](#media-queries) 40 | - [Credits](#credits) 41 | 42 | 43 | 44 | # Amadeus 45 | Keep your CSS tidy and your team all on the same page. Amadeus is a set of **CSS Conventions** for naming **variables** and **selectors** and **formatting nested CSS**. 46 | 47 | # Variables 48 | 49 | Conceived as a convention for future versions of [Kickstart](http://getkickstart.com), Amadeus is a set of conventions to **keep your CSS variables organized and intuitive**. These are not conventions for CSS *classes* however. 50 | 51 | Inspired by recommendations from [CSS Tricks](http://css-tricks.com/strategies-keeping-css-specificity-low/?utm_content=bufferdc5e1&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer). 52 | 53 | This documentation uses the Sass syntax, however these conventions are compatible with any CSS pre-processor. This is also designed to integrate nicely into a future [native CSS variable](http://www.w3.org/TR/css-variables-1/) syntax. Love it or hate it, you can do something about it! Start a discussion in the Issues and let's evolve these conventions together. 54 | 55 | ## How it works 56 | 57 | Let's start with some easy stuff. Let's set a red color that is closer to our site's branding than default red. 58 | 59 | $RED: rgb(248, 240, 255) 60 | 61 | Hang on, we actually have a few different shades of red, let's add a modifier 62 | 63 | $RED_light: rgb(245, 129, 129) 64 | $RED: rgb(234, 40, 40) 65 | $RED_dark: rgb(194, 21, 21) 66 | 67 | Now we want to set a font size for the `