From 2a42ac16b9a705b2c5b369e0c55867cd568f7e8f Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 1 Nov 2020 21:11:47 +0100 Subject: Readme update, lift direct-child restriction on iro-bem-at-theme --- README.md | 41 ++++++++++------------------------------- src/bem/_theme.scss | 6 +++--- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 62b15cc..7c04922 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,20 @@ # iro-sass -iro-sass is a [Sass](http://sass-lang.com/) library that I developed to create websites. - -Its main feature is a **[BEM system](#bem-system)**, though it also includes some other useful features: +iro-sass is a multi-purpose [Sass](http://sass-lang.com/) library for designing websites. +Its main feature is a BEM system, but it also includes some other useful features: - Easing background gradients - Context stacks: A temporary data storage -- Property trees]: A persistent data storage +- Property trees: A persistent data storage - Responsive properties: A generalization of responsive typography - Modular scales -All features are explained in greater detail in the [Wiki](https://git.vulpes.one/Feuerfuchs/iro-sass/wiki). -The rest of this document is a quick overview over what iro-sass has to offer. +## Contents - [iro-sass](#iro-sass) + - [Contents](#contents) - [Getting started](#getting-started) - [Development](#development) - - [Changelog](#changelog) - - [Known issues](#known-issues) - [Features](#features) - [BEM system](#bem-system) - [Easing background gradients](#easing-background-gradients) @@ -28,48 +25,30 @@ The rest of this document is a quick overview over what iro-sass has to offer. ## Getting started -Install the package [iro-sass](https://www.npmjs.com/package/iro-sass) from the npm repository using the package manager of your choice. - -- npm: `npm install iro-sass` -- yarn: `yarn add iro-sass` - -Then include iro-sass in your Sass stylesheet: +Include iro-sass in your Sass stylesheet: ```scss @import 'iro-sass/src/main'; -// (overrides) -// files that depend on iro-sass ``` iro-sass uses function, mixin and variable names that are prefixed with 'iro-' to avoid clashes with other libraries. There are, however, shorter versions of many mixins and functions available (referred to as "shortcodes"). -Just import one of these files to use a certain set of shortcodes: +Just import one of these files to use a specific set of shortcodes: - `iro-sass/src/bem-shortcodes`: BEM - `iro-sass/src/responsive-shortcodes`: Responsive properties - `iro-sass/src/harmony-shortcodes`: Modular scales -**Note:** If the 'node_modules' folder isn't a search path for Sass imports, you have to prefix your imports with the path to 'node_modules'. -An import might then look like this: `@import 'node_modules/iro-sass/src/main';` - ## Development Clone the repository, then run `npm install` or `yarn` to install all dependencies. The following npm scripts are available: -- `lint`: Lint the source code with [sass-lint](https://www.npmjs.com/package/sass-lint). +- `lint`: Lint the source code. - `livelint`: Lint automatically whenever the code changes. -- `doc`: Generate the SassDoc documentation with [sassdoc](http://sassdoc.com/). -- `test`: Run unit tests with [sass-true](https://www.npmjs.com/package/sass-true) and [Mocha](https://mochajs.org/). - -## Changelog - -[Changelog](https://git.vulpes.one/Feuerfuchs/iro-sass/blob/main/CHANGELOG.md) - -## Known issues - -Check out the [issue tracker](https://git.vulpes.one/Feuerfuchs/iro-sass/issues). +- `doc`: Generate the SassDoc documentation. +- `test`: Run unit tests. ## Features diff --git a/src/bem/_theme.scss b/src/bem/_theme.scss index b4bcc76..a49981c 100644 --- a/src/bem/_theme.scss +++ b/src/bem/_theme.scss @@ -45,9 +45,9 @@ $parent-context: iro-context-get($iro-bem-context-id, 'block'); $parent-selector: map-get(nth($parent-context, 2), 'selector'); - @if not iro-selector-suffix-match(&, $parent-selector) { - @error 'An at-theme rule must be an immediate child of a block'; - } + //@if not iro-selector-suffix-match(&, $parent-selector) { + // @error 'An at-theme rule must be an immediate child of a block'; + //} $selector: iro-bem-theme-selector($name, $names...); $selector: selector-nest($selector, &); -- cgit v1.2.3-70-g09d2