From a7ba4ddf6fa8e56ea19fb54dd2d3a8d5bf79a5b7 Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Mon, 27 Sep 2021 09:58:01 -0700 Subject: [PATCH] css fixes for release (#8523) * fix scriptmanager view * use my old version of modal overrides which seemed to work * fix count on import modal too --- theme/home.less | 2 +- theme/themes/pxt/modules/modal.overrides | 82 ++++++++---------------- webapp/src/projects.tsx | 12 +++- 3 files changed, 37 insertions(+), 59 deletions(-) diff --git a/theme/home.less b/theme/home.less index e9098bc76c8e..e221fde1a99b 100644 --- a/theme/home.less +++ b/theme/home.less @@ -420,7 +420,7 @@ } } -.scriptmanager, .projectsdialog { +.scriptmanager .ui.cards, .projectsdialog { .ui.card { margin-right: 5px; border-radius: @homeCardBorderRadius; diff --git a/theme/themes/pxt/modules/modal.overrides b/theme/themes/pxt/modules/modal.overrides index 7c9f5e2b750e..fd6f5435f5e6 100644 --- a/theme/themes/pxt/modules/modal.overrides +++ b/theme/themes/pxt/modules/modal.overrides @@ -30,6 +30,7 @@ position: absolute !important; top: 0 !important; left: 0 !important; + transform: none; margin: 0 !important; padding: 0 !important; border: 0 !important; @@ -43,6 +44,32 @@ user-select: none; } +.modals.dimmer .ui.scrolling.modal { + margin-top: 3.5rem auto !important; + top: auto; +} + +.ui.modal { + position: fixed; + display: none; + z-index: @zIndex; + text-align: left; + top: 50%; + left: 50%; + transform: translate(-50%, 0); + + background: @background; + border: @border; + box-shadow: @boxShadow; + transform-origin: @transformOrigin; + + flex: 0 0 auto; + + border-radius: @borderRadius; + user-select: text; + will-change: top, left, margin, transform, opacity; +} + /* Back button */ .ui.button.back-button { background: none; @@ -196,61 +223,6 @@ } } -body .dimmable.dimmed .ui.page.dimmer .ui.modal { - position: fixed; - top: 50%; - left: 50%; -} - -@media only screen and (max-width: @largestMobileScreen) { - body .dimmable.dimmed .ui.page.dimmer .ui.modal { - margin: 0 0 0 -47.5%; - } -} - -@media only screen and (min-width: @tabletBreakpoint) { - body .dimmable.dimmed .ui.page.dimmer { - .ui.modal { - margin: 0 0 0 -44%; - } - .ui.tiny.modal { - margin: 0 0 0 -26.4%; - } - } -} - -@media only screen and (min-width: @computerBreakpoint) { - body .dimmable.dimmed .ui.page.dimmer { - .ui.modal { - margin: 0 0 0 -425px; - } - - .ui.tiny.modal { - margin: 0 0 0 -255px; - } - - .ui.large.modal { - margin: 0 0 0 -510px; - } - } -} - -@media only screen and (min-width: @largeMonitorBreakpoint) { - body .dimmable.dimmed .ui.page.dimmer { - .ui.modal { - margin: 0 0 0 -450px; - } - - .ui.tiny.modal { - margin: 0 0 0 -270px; - } - - .ui.large.modal { - margin: 0 0 0 -540px; - } - } -} - /******************************* Modal Close Icon diff --git a/webapp/src/projects.tsx b/webapp/src/projects.tsx index b02c4753502a..9162c1102b2b 100644 --- a/webapp/src/projects.tsx +++ b/webapp/src/projects.tsx @@ -1287,14 +1287,20 @@ export class ImportDialog extends data.Component -
- {pxt.appTarget.compile && !disableFileAccessinMaciOs && !disableFileAccessinAndroid ? +
+ {showOpenFiles && : undefined} + />} {showImport &&