|
| 1 | +/* TODO: Migrate any other should-be-global Portal modal styles to here */ |
| 2 | +/* FP-344: Consider a Modal component and a CSS module */ |
| 3 | +/* |
| 4 | +Modal (Bootstrap) |
| 5 | +
|
| 6 | +Override Bootstrap styles. See: |
| 7 | +
|
| 8 | +- [ReactStrap Forms](https://reactstrap.github.io/components/modals/) |
| 9 | +- [Bootstrap Forms](https://getbootstrap.com/docs/4.4/components/modal/) |
| 10 | +
|
| 11 | +Styleguide Components.Bootstrap.Modal |
| 12 | +*/ |
| 13 | +@import url('../tools/x-truncate.css'); |
| 14 | + |
| 15 | +.modal-content, |
| 16 | +.modal-header, |
| 17 | +.modal-body, |
| 18 | +.modal-footer { |
| 19 | + border-radius: 0; |
| 20 | +} |
| 21 | +.modal-content, |
| 22 | +.modal-header, |
| 23 | +.modal-body { |
| 24 | + border: none; |
| 25 | +} |
| 26 | +.modal-footer { |
| 27 | + border-left: none; |
| 28 | + border-right: none; |
| 29 | + border-bottom: none; |
| 30 | +} |
| 31 | + |
| 32 | +.modal-header { |
| 33 | + background-color: var(--global-color-primary--x-light); |
| 34 | + padding: 1.35rem 1.75rem; /* (18px 23.5px design * 1.2 design-to-app ratio) */ |
| 35 | +} |
| 36 | +.modal-title { |
| 37 | + color: var(--global-color-primary--xx-dark); |
| 38 | + font-weight: normal; |
| 39 | + font-size: 1.2rem; /* 16px design * 1.2 design-to-app ratio */ |
| 40 | + |
| 41 | + @extend .x-truncate--one-line; |
| 42 | +} |
| 43 | + |
| 44 | +/* To darken close button */ |
| 45 | +.modal-header .close { |
| 46 | + color: var(--global-color-primary--x-dark); |
| 47 | + opacity: 1; |
| 48 | +} |
| 49 | +/* FAQ: The specificity matches Bootstrap */ |
| 50 | +.modal-header .close:not(:disabled):not(.disabled):focus, |
| 51 | +.modal-header .close:not(:disabled):not(.disabled):hover { |
| 52 | + color: var(--global-color-primary--xx-dark); |
| 53 | + opacity: 1; |
| 54 | +} |
| 55 | + |
| 56 | +/* To render modal close button icon as a Cortal icon */ |
| 57 | +/* CAVEAT: Pass `charCode=""` to `<ModalHeader>` */ |
| 58 | +.modal-header .close span { |
| 59 | + /* To mimic `.icon` styles without `@extend` or `composes` (unavailable) */ |
| 60 | + /* HACK: Copied (and reduced and edited) from `src/styles/trumps/icon...` */ |
| 61 | + font-size: 1.5rem; /* bigger to match header text font height (like design) */ |
| 62 | + font-family: Cortal-Icons !important; |
| 63 | +} |
| 64 | + |
| 65 | +.modal-header.has-MuiTabs { |
| 66 | + flex-direction: row; |
| 67 | + position: relative; |
| 68 | + height: 63.5px; |
| 69 | + border-bottom: 1px solid #afafaf; |
| 70 | + padding: 5px; |
| 71 | +} |
| 72 | +.modal-header.has-MuiTabs .close { |
| 73 | + transform: translate(-25%, 25%); |
| 74 | +} |
0 commit comments