Skip to content

Commit

Permalink
Wizard fixes for iPhone
Browse files Browse the repository at this point in the history
* Prevent page scrolling under the wizard dialog, making it difficult to scroll the
  wizard content itself
* Don't add custom scrollbar styles on iOS, which cause layout problems on an iPhone
* Reduce wizard max-height on iPhone to prevent the buttons being hidden on iPhone X
  • Loading branch information
spadgett committed Nov 3, 2017
1 parent 1d3a73b commit b49544b
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 92 deletions.
72 changes: 40 additions & 32 deletions app/styles/_core.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,46 @@
display: none !important;
}

// Prevent zooming when focusing input fields in mobile Safari. Try to only
// target mobile devices to avoid larger-than-wanted fonts elsewhere.
@media only screen and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 0) {
input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
select.form-control,
textarea,
textarea.form-control,
.console-os .ace_editor {
font-size: 16px;
}

// Fix Bootstrap modal dialog zoom on the iPhone
// See http://stackoverflow.com/questions/32675849/screen-zooms-in-when-a-bootstrap-modal-is-opened-on-ios-9-safari
body {
padding-right: 0px !important
}
.modal-open {
overflow-y: auto;
}
}

// Prevent having to tap tabs twice on iOS.
.ios .nav-tabs > {
li > a:hover:before {
content: none;
}
li.active > a:before {
content: '';
@media only screen and (max-device-width: 736px) {
body.ios {
// Fix Bootstrap modal dialog zoom on the iPhone
// See http://stackoverflow.com/questions/32675849/screen-zooms-in-when-a-bootstrap-modal-is-opened-on-ios-9-safari
padding-right: 0px !important;

// Prevent page from scrolling underneath modals and wizard overlays.
&.modal-open, &.overlay-open {
overflow-y: auto;
position: fixed;
}

// Prevent zooming when focusing input fields in mobile Safari. Only
// target iPhones to avoid larger-than-wanted fonts elsewhere.
input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
select.form-control,
textarea,
textarea.form-control,
.console-os .ace_editor {
font-size: 16px;
}

// Make sure buttons are visible always on iPhone X.
.catalogs-overlay-panel .wizard-pf-main {
max-height: calc(100vh ~"-" 275px);
}

// Prevent having to tap tabs twice on iOS.
.nav-tabs > {
li > a:hover:before {
content: none;
}
li.active > a:before {
content: '';
}
}
}
}

Expand Down
92 changes: 47 additions & 45 deletions app/styles/_scrollbars.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,61 @@
// Scrollbars for main flex containers
// ------------------------------------------------------

::-webkit-scrollbar {
height: 10px;
overflow: visible;
width: @scrollbar-width;
}

::-webkit-scrollbar-corner {
background: transparent;
}

::-webkit-scrollbar-thumb {
background-clip: padding-box;
background-color: @scrollbar-thumb;
border: solid transparent;
border-width: 1px 1px 1px 1px;
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07);
max-height: 60px;
min-height: 28px;
padding: 100px 0 0;
&:active,
&:hover {
background-color: @scrollbar-thumb-hover;
not(.ios) {
::-webkit-scrollbar {
height: 10px;
overflow: visible;
width: @scrollbar-width;
}
}

::-webkit-scrollbar-track {
background-clip:padding-box;
background-color: @scrollbar-track;
}
::-webkit-scrollbar-corner {
background: transparent;
}

.chromeless .middle,
.landing,
.landing-side-bar,
.log-view .log-view-output,
.project-bar .dropdown-menu {
&::-webkit-scrollbar-thumb {
background-color: @scrollbar-thumb-inverse;
box-shadow: inset 1px 1px 0 rgba(255,255,255,.1),inset 0 -1px 0 rgba(255,255,255,.07);
::-webkit-scrollbar-thumb {
background-clip: padding-box;
background-color: @scrollbar-thumb;
border: solid transparent;
border-width: 1px 1px 1px 1px;
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07);
max-height: 60px;
min-height: 28px;
padding: 100px 0 0;
&:active,
&:hover {
background-color: @scrollbar-thumb-hover-inverse;
background-color: @scrollbar-thumb-hover;
}
}
}

.landing::-webkit-scrollbar-track {
background-color: @scrollbar-track-landing;
}
::-webkit-scrollbar-track {
background-clip:padding-box;
background-color: @scrollbar-track;
}

.landing-side-bar::-webkit-scrollbar-track {
background-color: @scrollbar-track-landing-side-bar;
}
.chromeless .middle,
.landing,
.landing-side-bar,
.log-view .log-view-output,
.project-bar .dropdown-menu {
&::-webkit-scrollbar-thumb {
background-color: @scrollbar-thumb-inverse;
box-shadow: inset 1px 1px 0 rgba(255,255,255,.1),inset 0 -1px 0 rgba(255,255,255,.07);
&:active,
&:hover {
background-color: @scrollbar-thumb-hover-inverse;
}
}
}

.project-bar ::-webkit-scrollbar-track {
background-color: @scrollbar-track-inverse;
.landing::-webkit-scrollbar-track {
background-color: @scrollbar-track-landing;
}

.landing-side-bar::-webkit-scrollbar-track {
background-color: @scrollbar-track-landing-side-bar;
}

.project-bar ::-webkit-scrollbar-track {
background-color: @scrollbar-track-inverse;
}
}
31 changes: 16 additions & 15 deletions dist/styles/main.css

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

0 comments on commit b49544b

Please sign in to comment.