-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) Standardize modal header close button styles (#1420)
Standardizes the positioning and styling of modal close buttons across the application by: - Adding consistent modal header styles across all modals - Positioning close buttons absolutely in the top-right corner - Adding hover state styling for close buttons - Fixing popover positioning for left-aligned modals This change affects modals in: - Appointments app - Bed management app - Patient registration app - Service queues app This resolves an issue that we think is caused by Carbon version mismatches. The hope is that this [pull request](openmrs/openmrs-esm-core#1215) in Core will fix the issue more permanently.
- Loading branch information
1 parent
1fc1d37
commit 255c56a
Showing
24 changed files
with
355 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/esm-appointments-app/src/patient-appointments/patient-appointments-cancel.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@use '@carbon/layout'; | ||
|
||
.modalHeader { | ||
:global { | ||
.cds--modal-close-button { | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-inline-end: 0; | ||
margin: 0; | ||
margin-top: calc(-1 * #{layout.$spacing-05}); | ||
} | ||
|
||
.cds--modal-close { | ||
background-color: rgba(0, 0, 0, 0); | ||
|
||
&:hover { | ||
background-color: var(--cds-layer-hover); | ||
} | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-content { | ||
transform: translate(-4rem, 0.85rem); | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-caret { | ||
transform: translate(-3.75rem, 1.25rem); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@use '@carbon/layout'; | ||
|
||
.modalHeader { | ||
:global { | ||
.cds--modal-close-button { | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-inline-end: 0; | ||
margin: 0; | ||
margin-top: calc(-1 * #{layout.$spacing-05}); | ||
} | ||
|
||
.cds--modal-close { | ||
background-color: rgba(0, 0, 0, 0); | ||
|
||
&:hover { | ||
background-color: var(--cds-layer-hover); | ||
} | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-content { | ||
transform: translate(-4rem, 0.85rem); | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-caret { | ||
transform: translate(-3.75rem, 1.25rem); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/esm-patient-registration-app/src/widgets/cancel-patient-edit.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@use '@carbon/layout'; | ||
|
||
.modalHeader { | ||
:global { | ||
.cds--modal-close-button { | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-inline-end: 0; | ||
margin: 0; | ||
margin-top: calc(-1 * #{layout.$spacing-05}); | ||
} | ||
|
||
.cds--modal-close { | ||
background-color: rgba(0, 0, 0, 0); | ||
|
||
&:hover { | ||
background-color: var(--cds-layer-hover); | ||
} | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-content { | ||
transform: translate(-4rem, 0.85rem); | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-caret { | ||
transform: translate(-3.75rem, 1.25rem); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@use '@carbon/layout'; | ||
|
||
.modalHeader { | ||
:global { | ||
.cds--modal-close-button { | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-inline-end: 0; | ||
margin: 0; | ||
margin-top: calc(-1 * #{layout.$spacing-05}); | ||
} | ||
|
||
.cds--modal-close { | ||
background-color: rgba(0, 0, 0, 0); | ||
|
||
&:hover { | ||
background-color: var(--cds-layer-hover); | ||
} | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-content { | ||
transform: translate(-4rem, 0.85rem); | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-caret { | ||
transform: translate(-3.75rem, 1.25rem); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ges/esm-service-queues-app/src/clear-queue-entries-dialog/clear-queue-entries-dialog.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
@use '@carbon/layout'; | ||
@use '@carbon/type'; | ||
@use '@openmrs/esm-styleguide/src/vars' as *; | ||
|
||
#subHeading { | ||
@include type.type-style('heading-compact-01'); | ||
color: $ui-05; | ||
} | ||
|
||
.modalHeader { | ||
:global { | ||
.cds--modal-close-button { | ||
position: absolute; | ||
inset-block-start: 0; | ||
inset-inline-end: 0; | ||
margin: 0; | ||
margin-top: calc(-1 * #{layout.$spacing-05}); | ||
} | ||
|
||
.cds--modal-close { | ||
background-color: rgba(0, 0, 0, 0); | ||
|
||
&:hover { | ||
background-color: var(--cds-layer-hover); | ||
} | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-content { | ||
transform: translate(-4rem, 0.85rem); | ||
} | ||
|
||
.cds--popover--left > .cds--popover > .cds--popover-caret { | ||
transform: translate(-3.75rem, 1.25rem); | ||
} | ||
} | ||
} |
Oops, something went wrong.