styles.module.scss
118 lines
| 1 | .statWidget { |
| 2 | display: flex; |
| 3 | flex-direction: column; |
| 4 | justify-content: space-between; |
| 5 | gap: var(--givewp-spacing-2); |
| 6 | padding: var(--givewp-spacing-6); |
| 7 | background-color: var(--givewp-shades-white); |
| 8 | color: var(--givewp-neutral-700); |
| 9 | font-weight: 600; |
| 10 | border-radius: var(--givewp-rounded-8); |
| 11 | } |
| 12 | |
| 13 | .statWidget header, .statWidget footer { |
| 14 | flex: 1; |
| 15 | } |
| 16 | |
| 17 | .statWidget footer { |
| 18 | font-size: 12px; |
| 19 | font-weight: 400; |
| 20 | line-height: 18px; |
| 21 | color: var(--givewp-neutral-700); |
| 22 | } |
| 23 | |
| 24 | .statWidgetAmount { |
| 25 | flex: 1; |
| 26 | display: flex; |
| 27 | flex-direction: row; |
| 28 | justify-content: space-between; |
| 29 | align-items: baseline; |
| 30 | } |
| 31 | |
| 32 | .statWidgetDisplay { |
| 33 | font-size: 2.25rem; |
| 34 | font-weight: 600; |
| 35 | line-height: 44px; |
| 36 | color: var(--givewp-neutral-900); |
| 37 | width: 100%; |
| 38 | |
| 39 | span { |
| 40 | display: flex; |
| 41 | justify-content: center; |
| 42 | align-items: center; |
| 43 | height: 44px; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | .revenueWidget { |
| 48 | flex: 2; |
| 49 | background-color: var(--givewp-shades-white); |
| 50 | padding: 20px; |
| 51 | border-radius: var(--givewp-rounded-8); |
| 52 | grid-column: span 2; |
| 53 | } |
| 54 | |
| 55 | .percentChangePill { |
| 56 | display: flex; |
| 57 | align-items: center; |
| 58 | justify-content: center; |
| 59 | padding: 2px 12px 2px 4px; |
| 60 | font-size: .8rem; |
| 61 | border-radius: var(--givewp-rounded-16); |
| 62 | min-width: 71px; |
| 63 | height: 24px; |
| 64 | gap: 2px; |
| 65 | } |
| 66 | |
| 67 | .progressWidget { |
| 68 | flex: 1; |
| 69 | background-color: var(--givewp-shades-white); |
| 70 | padding: 20px; |
| 71 | border-radius: var(--givewp-rounded-8); |
| 72 | } |
| 73 | |
| 74 | .headerSpacing { |
| 75 | display: flex; |
| 76 | flex-direction: column; |
| 77 | gap: .25rem; |
| 78 | } |
| 79 | |
| 80 | .mainGrid { |
| 81 | display: grid; |
| 82 | grid-template-columns: repeat(3, 1fr); |
| 83 | row-gap: var(--givewp-spacing-6); |
| 84 | column-gap: var(--givewp-spacing-4); |
| 85 | } |
| 86 | |
| 87 | .nestedGrid { |
| 88 | grid-column: span 1; |
| 89 | display: grid; |
| 90 | gap: var(--givewp-spacing-6); |
| 91 | } |
| 92 | |
| 93 | @media (max-width: 900px) { |
| 94 | .mainGrid { |
| 95 | grid-template-columns: 1fr; |
| 96 | gap: var(--givewp-spacing-3); |
| 97 | } |
| 98 | |
| 99 | .revenueWidget { |
| 100 | grid-column: span 1; |
| 101 | } |
| 102 | |
| 103 | .nestGrid { |
| 104 | grid-template-columns: 1fr; |
| 105 | gap: var(--givewp-spacing-3); |
| 106 | } |
| 107 | |
| 108 | /* Only center content when grid becomes single column */ |
| 109 | .statWidgetAmount { |
| 110 | justify-content: center; |
| 111 | text-align: center; |
| 112 | } |
| 113 | |
| 114 | .statWidgetDisplay { |
| 115 | text-align: center; |
| 116 | } |
| 117 | } |
| 118 |