Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modal] Introducing "overlay fullscreen modal" #526

Merged
merged 3 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 31 additions & 10 deletions src/definitions/modules/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -185,31 +185,31 @@

/* Modal Width */
@media only screen and (max-width : @largestMobileScreen) {
.ui.modal {
.ui.modal:not(.fullscreen) {
width: @mobileWidth;
margin: @mobileMargin;
}
}
@media only screen and (min-width : @tabletBreakpoint) {
.ui.modal {
.ui.modal:not(.fullscreen) {
width: @tabletWidth;
margin: @tabletMargin;
}
}
@media only screen and (min-width : @computerBreakpoint) {
.ui.modal {
.ui.modal:not(.fullscreen) {
width: @computerWidth;
margin: @computerMargin;
}
}
@media only screen and (min-width : @largeMonitorBreakpoint) {
.ui.modal {
.ui.modal:not(.fullscreen) {
width: @largeMonitorWidth;
margin: @largeMonitorMargin;
}
}
@media only screen and (min-width : @widescreenMonitorBreakpoint) {
.ui.modal {
.ui.modal:not(.fullscreen) {
width: @widescreenMonitorWidth;
margin: @widescreenMonitorMargin;
}
Expand All @@ -234,6 +234,12 @@
padding: @mobileHeaderPadding !important;
padding-right: @closeHitbox !important;
}
.ui.overlay.fullscreen.modal .content.content.content {
min-height: @overlayFullscreenScrollingContentMaxHeightMobile;
}
.ui.overlay.fullscreen.modal .scrolling.content.content.content {
max-height: @overlayFullscreenScrollingContentMaxHeightMobile;
}
.ui.modal > .content {
display: block;
padding: @mobileContentPadding !important;
Expand Down Expand Up @@ -332,7 +338,9 @@
top: auto !important;
}


.ui.legacy.overlay.fullscreen.modal {
margin-top: -@scrollingMargin !important;
}

/*******************************
States
Expand Down Expand Up @@ -391,7 +399,7 @@
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.modals.dimmer .ui.scrolling.modal {
.modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
margin: @scrollingMargin auto;
}

Expand All @@ -403,7 +411,7 @@
.scrolling.undetached.dimmable.dimmed > .dimmer {
overflow: hidden;
}
.scrolling.undetached.dimmable .ui.scrolling.modal {
.scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen) {
position: absolute;
left: 50%;
margin-top: @scrollingMargin !important;
Expand All @@ -414,16 +422,29 @@
max-height: @scrollingContentMaxHeight;
overflow: auto;
}
.ui.overlay.fullscreen.modal .content {
min-height: @overlayFullscreenScrollingContentMaxHeight;
}
.ui.overlay.fullscreen.modal .scrolling.content {
max-height: @overlayFullscreenScrollingContentMaxHeight;
}

/*--------------
Full Screen
---------------*/

.ui.fullscreen.modal {
width: @fullScreenWidth !important;
left: @fullScreenOffset !important;
width: @fullScreenWidth;
left: @fullScreenOffset;
margin: @fullScreenMargin;
}
.ui.overlay.fullscreen.modal {
width: 100%;
left: 0;
margin: 0 auto;
top: 0;
border-radius:0;
}
.ui.fullscreen.modal > .header {
padding-right: @closeHitbox;
}
Expand Down
4 changes: 3 additions & 1 deletion src/themes/default/modules/modal.variables
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@
@mobileScrollingMargin: @mobileTopAlignedMargin;

/* Scrolling Content */
@scrollingContentMaxHeight: calc(80vh - 10em);
@scrollingContentMaxHeight: calc(80vh - 10rem);
@overlayFullscreenScrollingContentMaxHeight: calc(100vh - 9.1rem);
@overlayFullscreenScrollingContentMaxHeightMobile: calc(100vh - 8.1rem);

/*-------------------
Variations
Expand Down