From f6a45d7e0aac8bcb5a97256fa0988351c19191f6 Mon Sep 17 00:00:00 2001 From: Vladislav Shkodin Date: Fri, 6 Oct 2017 13:58:10 +0300 Subject: [PATCH] Docs: add 'options' section --- readme.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index b3e1c2f..55774b3 100644 --- a/readme.md +++ b/readme.md @@ -12,10 +12,10 @@ $ npm install postcss-responsive-hints ## Usage ```js -var postcss = require("postcss") +const postcss = require("postcss") -var output = postcss() - .use(require('postcss-responsive-hints')(/* options */)) +const output = postcss() + .use(require('postcss-responsive-hints')({/* options */})) .process(require("fs").readFileSync("input.css", "utf8")) .css ``` @@ -24,7 +24,7 @@ Having the following styles in `input.css`: ```css .test { - padding: 10px /* | 20px | x | 30px | */; + padding: 10px | 20px | x | 30px; } ``` @@ -32,7 +32,7 @@ you will get: ```css .test { - padding: 10px /* | 20px | x | 30px | */; + padding: 10px; } @media (min-width: 480px) { @@ -50,6 +50,29 @@ you will get: } ``` +## Options + +#### breakpoints: `Array` + +> default: `['480px', '768px', '1024px', '1200px']` + +Provide a custom set of breakpoints + +#### comments: `boolean` + +> default: `false` + +Allows to avoid non-standard syntax by wrapping responsive +hints in css comments + +Example: + +```css +.test { + padding: 10px /* | 20px | x | 30px | */; +} +``` + ## TODO - Write better docs