Skip to content

Commit

Permalink
Prevent page from jumping when opening a modal
Browse files Browse the repository at this point in the history
This CSS prevents the page from jumping when a modal is opened but
still causing the background to be not scrollable for the user.

Closes drublic#24.
  • Loading branch information
drublic committed May 10, 2013
1 parent 1256405 commit 73e1390
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## HEAD

* Prevent page from jumping when opening a modal (#24)
* Remove an error when a hash has no HTML element associate (#27)
* Remove check if modal contains an id on focus - it is not necessary (#25)
* Rename component.json to bower.json to match new bower spec
Expand Down
4 changes: 2 additions & 2 deletions modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ html {
}

.has-overlay {
height: 100%;
overflow: hidden;

> body {
height: 100%;
overflow-y: hidden;
overflow-y: scroll;
}
}

Expand Down
4 changes: 2 additions & 2 deletions site/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,11 @@ html {
}

.has-overlay {
height: 100%;
overflow: hidden;
}
.has-overlay > body {
height: 100%;
overflow-y: hidden;
overflow-y: scroll;
}

.semantic-content {
Expand Down

0 comments on commit 73e1390

Please sign in to comment.