Skip to content

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
- added mixins 'offx' - for classes and 'offxAll' - for global prevent overflow issues
- updated documentation
- added additional test cases
  • Loading branch information
andreymatin committed May 12, 2023
1 parent d114c34 commit 34e2958
Show file tree
Hide file tree
Showing 17 changed files with 194 additions and 40 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# [1.4.0]

- added mixins 'offx' - for classes and 'offxAll' - for global prevent overflow issues
- updated documentation
- added additional test cases

# [1.3.9]

- updated documentation
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,35 @@ where need to ❗deep reset all properties of the ❗Shadow DOM elements without
| meterReset | @include meterReset; | Styles reset for ```<meter>``` |
| progressReset | @include progressReset; | Styles reset for ```<progress>``` |
| inputColorReset | @include inputColorReset; | Rest for input type:color |
| offx | @include offx; | Prevent horizontal overflow issues for elements |
| offxAll | @include offxAll; | offx for whole document |


### @mixin offxAll

This mixin just added

```css
html, body {
overflow-x: hidden
}
```

but

- It isn't good for accessibility because it hides overflowed content permanently
- CSS poperty ```position: sticky;``` doesn't work anymore because an ancestor element (```html, body```) has overflow property set

just one profit - rought fix for whole page.

Please use ``` @include offx;``` for selected block elements instead to avoid CSS 'sticky' and UX issues.
For example:

```scss
.page-content {
@include offx;
}
```

## Technical Files

Expand Down
14 changes: 14 additions & 0 deletions _reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@
}
}

// Global Overflow-x hide
@mixin offxAll {
html, body {
overflow-x: hidden;
}
}

// Overflow-x hide
@mixin offx {
overflow-x: hidden;
}




/**
* Modern CSS Reset Tweaks
Expand Down
2 changes: 1 addition & 1 deletion build/reset.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit 34e2958

Please sign in to comment.