|
4 | 4 | makeChipStyleByColor,
|
5 | 5 | makeSecondaryButtonStyle,
|
6 | 6 | makeTextButtonStyle,
|
7 |
| - makeContainedButtonStyle |
| 7 | + makeContainedButtonStyle, |
| 8 | + getFlagshipCssVar |
8 | 9 | } from './helpers'
|
9 | 10 |
|
10 | 11 | const SWITCH_BAR_WIDTH = 25
|
@@ -428,26 +429,27 @@ export const makeOverrides = theme => ({
|
428 | 429 | },
|
429 | 430 | paperFullScreen: {
|
430 | 431 | '& .cozyDialogActions': {
|
431 |
| - paddingBottom: |
432 |
| - 'calc(env(safe-area-inset-bottom) + var(--flagship-bottom-height))' |
| 432 | + paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar( |
| 433 | + 'bottom' |
| 434 | + )})` |
433 | 435 | },
|
434 | 436 | // Can't do that within the stylus file because we need to only target
|
435 | 437 | // the fullscreen dialog
|
436 | 438 | '& [class*="DialogCloseButton"]': {
|
437 |
| - transform: 'translateY(var(--flagship-top-height))' |
| 439 | + transform: `translateY(${getFlagshipCssVar('top')})` |
438 | 440 | },
|
439 | 441 | '& [class*="DialogBackButton"]': {
|
440 |
| - transform: 'translateY(var(--flagship-top-height))' |
| 442 | + transform: `translateY(${getFlagshipCssVar('top')})` |
441 | 443 | },
|
442 | 444 | // 0.75rm === MuiDialogTitle.root.sm
|
443 | 445 | // we should not target specifically flagship-app since
|
444 | 446 | // we should only rely on the css var. But this is for
|
445 | 447 | // another time.
|
446 | 448 | '.flagship-app & .cozyDialogTitle': {
|
447 |
| - paddingTop: 'calc(var(--flagship-top-height) + 0.75rem) !important' |
| 449 | + paddingTop: `calc(${getFlagshipCssVar('top')} + 0.75rem) !important` |
448 | 450 | },
|
449 | 451 | '.flagship-app & .cozyDialogContent': {
|
450 |
| - marginBottom: 'var(--flagship-bottom-height) !important' |
| 452 | + marginBottom: `${getFlagshipCssVar('bottom')} !important` |
451 | 453 | }
|
452 | 454 | }
|
453 | 455 | },
|
@@ -506,13 +508,15 @@ export const makeOverrides = theme => ({
|
506 | 508 | '& .dialogContentWrapper': {
|
507 | 509 | flexGrow: 1,
|
508 | 510 | '&:not(.withActions)': {
|
509 |
| - paddingBottom: |
510 |
| - 'calc(env(safe-area-inset-bottom) + var(--flagship-bottom-height) + 16px)' |
| 511 | + paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar( |
| 512 | + 'bottom' |
| 513 | + )} + 16px)` |
511 | 514 | }
|
512 | 515 | },
|
513 | 516 | '& .cozyDialogActions': {
|
514 |
| - paddingBottom: |
515 |
| - 'calc(env(safe-area-inset-bottom) + var(--flagship-bottom-height) + 16px)' |
| 517 | + paddingBottom: `calc(env(safe-area-inset-bottom) + ${getFlagshipCssVar( |
| 518 | + 'bottom' |
| 519 | + )} + 16px)` |
516 | 520 | }
|
517 | 521 | }
|
518 | 522 | },
|
|
0 commit comments