framework/less/lib/modals.less
Toby Zerner e466dcc626 Significantly improve mobile UX
Most of #137 done.

- Use FastClick to make everything feel more responsive
- Use transforms for animations to make them silky smooth
- Style the drawer the same as the header to keep things simple
- Revert to fixed composer, but allow it to be minimised
- Add a separate notifications page for mobile so it’s easy to go back
- Add indicator to the menu button when there are unread notifications
- Close the drawer when navigating away
- Make dropdowns/modals scrollable
- Many other mobile tweaks and bug fixes

Didn’t take much care to keep CSS clean, due to #103
2015-06-24 11:44:53 +09:30

157 lines
2.5 KiB
Plaintext

// ------------------------------------
// Modals
.modal-backdrop {
background-color: @fl-secondary-color;
&.in {
opacity: 0.9;
}
}
.modal-alert {
text-align: center;
& .alert {
border-radius: 0;
}
& .alert-controls {
margin: 0;
display: block;
}
}
.modal-body {
background-color: @fl-body-secondary-color;
padding: 25px 30px;
color: @fl-body-muted-color;
& .form-control {
background-color: #fff;
color: @fl-body-color;
&:focus {
border: 2px solid @fl-body-primary-color;
}
}
& .help-text {
font-size: 14px;
line-height: 1.5em;
margin-bottom: 25px;
}
& :last-child {
margin-bottom: 0;
}
}
.modal-footer {
border: 0;
padding: 20px;
text-align: center;
color: @fl-body-muted-color;
}
.modal-loading {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
opacity: 0;
pointer-events: none;
border-radius: @border-radius-base;
.transition(opacity 0.2s);
&.active {
opacity: 1;
pointer-events: auto;
}
}
.form-centered {
text-align: center;
& .form-control, & .btn {
margin: 0 auto;
text-align: center;
height: 50px;
padding: 15px 20px;
font-size: 15px;
}
}
@media @phone {
.modal.fade {
opacity: 1;
}
.modal {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
overflow: auto;
&.fade {
.transition-transform(0.3s);
.translate3d(0, 100vh, 0);
}
&.in {
-webkit-transform: none !important;
transform: none !important;
}
&:before {
content: " ";
.toolbar();
}
}
.modal-dialog {
margin: 0;
-webkit-transform: none !important;
transform: none !important;
}
.modal-content {
border-radius: 0;
border: 0;
min-height: 100vh;
padding-top: @mobile-header-height;
.box-shadow(none);
}
.modal-header {
padding: 0;
border: 0;
min-height: 0;
}
}
@media @tablet, @desktop, @desktop-hd {
.modal-dialog {
margin: 120px auto;
& .close {
position: absolute;
right: 10px;
top: 10px;
z-index: 1;
}
}
.modal-content {
border: 0;
border-radius: @border-radius-base;
.box-shadow(0 7px 15px @fl-shadow-color);
overflow: hidden;
}
.modal-sm {
width: 375px;
}
.modal-header {
text-align: center;
border: 0;
padding: 25px;
& h3 {
font-size: 20px;
margin: 0;
}
}
}