Skip to content

Commit

Permalink
fix(Modal): avoid breaking changes due to specificity
Browse files Browse the repository at this point in the history
the previous commit caused modal to have (0, 2, 0), which caused it to override user-defined className
  • Loading branch information
YossiSaadi committed Jan 7, 2025
1 parent 6f4b9d5 commit 97358dc
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions packages/core/src/components/Modal/Modal/Modal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@
position: fixed;
inset: 0;
z-index: var(--monday-modal-z-index, 10000);
}

.overlay {
position: fixed;
inset: 0;
height: 100%;
background-color: var(--color-surface);
}

.modal {
--top-actions-spacing: var(--spacing-large);
--top-actions-width: var(--spacing-xl);
--modal-inline-padding: var(--spacing-xl);

position: relative;
top: 50%;
left: 50%;

display: flex;
flex-direction: column;
width: var(--modal-width);
max-height: var(--modal-max-height);
background-color: var(--primary-background-color);
overflow: hidden;
border-radius: var(--border-radius-big);
box-shadow: var(--box-shadow-large);

&.withHeaderAction {
--top-actions-width: calc(var(--spacing-xl) * 2);
}

&.sizeSmall {
--modal-max-height: 50%;
--modal-width: 480px;
}

.overlay {
position: fixed;
inset: 0;
height: 100%;
background-color: var(--color-surface);
&.sizeMedium {
--modal-max-height: 80%;
--modal-width: 580px;
}

.modal {
--top-actions-spacing: var(--spacing-large);
--top-actions-width: var(--spacing-xl);
--modal-inline-padding: var(--spacing-xl);

position: relative;
top: 50%;
left: 50%;

display: flex;
flex-direction: column;
width: var(--modal-width);
max-height: var(--modal-max-height);
background-color: var(--primary-background-color);
overflow: hidden;
border-radius: var(--border-radius-big);
box-shadow: var(--box-shadow-large);

&.withHeaderAction {
--top-actions-width: calc(var(--spacing-xl) * 2);
}

&.sizeSmall {
--modal-max-height: 50%;
--modal-width: 480px;
}

&.sizeMedium {
--modal-max-height: 80%;
--modal-width: 580px;
}

&.sizeLarge {
--modal-max-height: 80%;
--modal-width: 840px;
}
&.sizeLarge {
--modal-max-height: 80%;
--modal-width: 840px;
}
}

0 comments on commit 97358dc

Please sign in to comment.