Skip to content

Commit

Permalink
Improve Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEssex committed May 23, 2022
1 parent 0394614 commit a1d9c86
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
63 changes: 60 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# Breakpoints

**WIP**
Helper library for easily using breakpoints in SASS

## Example Usage
## Variables Available

Below are the default variables, as this package uses @at-rules/breakpoints those variables will also be available

```scss
$breakpoints: (
"mobile": 320px,
"phablet": 425px,
"tablet": 768px,
"desktop": 1024px,
) !default;
```

## Usage

You can use all of the above breakpoints mixed with a term (up, down and only)
this will provide you with different min - max breakpoints on compile.

### Example One

```scss
@use "@at-rules/breakpoints/src/index" as *;
Expand All @@ -14,12 +33,50 @@ Helper library for easily using breakpoints in SASS
}
```

### Output

```css
@media screen and (max-width: 576px) {
.body {
color: red;
}
}
```

### Example two

```scss
@use "@at-rules/breakpoints/src/index" as *;

.body {
@include breakpoint(tablet down) {
color: red;
}
}
```

```css
@media screen and (max-width: 768px) {
.body {
color: red;
}
}
```

### Example three

```scss
@use "@at-rules/breakpoints/src/index" as *;

.body {
@include breakpoint(phablet only) {
color: red;
}
}
```

```css
@media screen and (min-width: 425px) and (max-width: 768px) {
.body {
color: red;
}
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@at-rules/breakpoints",
"version": "1.0.1",
"version": "1.0.2",
"description": "Helper library for easily using breakpoints in SASS",
"repository": {
"type": "git",
Expand Down

0 comments on commit a1d9c86

Please sign in to comment.