Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

.modal-overlay {
position: fixed;
z-index: $z-index-tooltip-overlay;
top: 0;
left: 0;
right: 0;
Expand All @@ -54,7 +55,7 @@
padding: 0;
margin: 0;
position: fixed;
z-index: $z-index-modal;
z-index: $z-index-tooltip;
pointer-events: auto;
}

Expand All @@ -64,3 +65,7 @@
outline: none;
}

.arrow {
z-index: $z-index-tooltip !important; /* otherwise it gets overridden in modal-with-arrow */
}
Comment on lines +68 to +70
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can make the selector more specific to avoid using !important?


Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const ModalWithArrow = ({
align,
layoutConfig,
arrowConfig,
arrowStyle,
modalContentStyle,
modalOverlayStyle,
title,
Expand Down Expand Up @@ -114,7 +115,7 @@ const ModalWithArrow = ({
src={arrowIcon}
alt=""
aria-hidden="true"
className={styles.arrow}
className={classNames(styles.arrow, arrowStyle)}
style={{
top: pos.arrowTop,
left: pos.arrowLeft,
Expand Down Expand Up @@ -149,6 +150,7 @@ ModalWithArrow.propTypes = {
arrowRightIcon: PropTypes.string
}).isRequired,
children: PropTypes.node.isRequired,
arrowStyle: PropTypes.string,
modalContentStyle: PropTypes.string,
modalOverlayStyle: PropTypes.string,
title: PropTypes.string
Expand Down
4 changes: 3 additions & 1 deletion packages/scratch-gui/src/css/z-index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ $z-index-monitor: 48; /* monitors go over add buttons */
$z-index-stage-question: 49; /* "ask" block text input goes above monitors */

$z-index-card: 480;
$z-index-tooltip-overlay: 481;
$z-index-tooltip: 490;
$z-index-alerts: 490;
$z-index-menu-bar: 491; /* menu-bar should go over monitors, alerts and tutorials */
$z-index-menu-bar: 491; /* menu-bar should go over monitors, alerts, tooltips and tutorials */
$z-index-loader: 500;
$z-index-modal-overlay: 501;
$z-index-modal: 510;
Expand Down
Loading