|
7 | 7 |
|
8 | 8 | .hds-alert {
|
9 | 9 | align-content: flex-start;
|
10 |
| - background-color: var(--token-color-surface-warning); |
11 | 10 | display: flex;
|
12 |
| - padding: 1.25rem; // 20px |
| 11 | + padding: 1rem; // 16px |
13 | 12 | }
|
14 | 13 |
|
15 | 14 | .hds-alert__icon {
|
|
27 | 26 | font-weight: var(--token-typography-font-weight-semibold);
|
28 | 27 | }
|
29 | 28 |
|
30 |
| - |
31 | 29 | .hds-alert__description {
|
32 | 30 | font-weight: var(--token-typography-font-weight-regular);
|
| 31 | + color: var(--token-color-foreground-primary); |
33 | 32 |
|
34 | 33 | .hds-alert__title + & {
|
35 |
| - margin-top: 0.75rem; // 12px |
| 34 | + margin-top: 0.25rem; // 4px |
36 | 35 | }
|
37 | 36 |
|
38 | 37 | strong {
|
|
46 | 45 | // Notice: in the future this may become a "Link::Inline" component (for now we declare the styles directly here)
|
47 | 46 | a {
|
48 | 47 | color: var(--token-color-foreground-action);
|
49 |
| - // at the moment the "focus" state is not well defined in design (the one that is in Figma does not work) so we just apply a simple color to the default outline |
| 48 | + // At the moment the "focus" state is not well defined in design (the one that is in Figma does not work) so we just apply a simple color to the default outline |
50 | 49 | outline-color: var(--token-color-focus-action-external);
|
51 | 50 |
|
52 | 51 | &:hover {
|
|
58 | 57 | }
|
59 | 58 | }
|
60 | 59 | }
|
| 60 | + |
| 61 | +// |
| 62 | +// COLOR & TYPE |
| 63 | +// |
| 64 | +.hds-alert--color-neutral { |
| 65 | + background-color: var(--token-color-surface-faint); |
| 66 | + |
| 67 | + &.hds-alert--type-page { |
| 68 | + box-shadow: 0px 1px 0px 0px var(--token-color-palette-alpha-300); |
| 69 | + } |
| 70 | + |
| 71 | + &.hds-alert--type-inline { |
| 72 | + border-color: var(--token-color-border-strong); |
| 73 | + } |
| 74 | + |
| 75 | + .hds-alert__icon, .hds-alert__title { |
| 76 | + color: var(--token-color-foreground-primary); |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | +.hds-alert--color-highlight { |
| 81 | + background-color: var(--token-color-surface-highlight); |
| 82 | + |
| 83 | + &.hds-alert--type-page { |
| 84 | + box-shadow: 0px 1px 0px 0px var(--token-color-border-highlight); |
| 85 | + } |
| 86 | + |
| 87 | + &.hds-alert--type-inline { |
| 88 | + border-color: var(--token-color-border-highlight); |
| 89 | + } |
| 90 | + |
| 91 | + .hds-alert__icon, .hds-alert__title { |
| 92 | + color: var(--token-color-foreground-highlight-on-surface); |
| 93 | + } |
| 94 | +} |
| 95 | + |
| 96 | +.hds-alert--color-success { |
| 97 | + background-color: var(--token-color-surface-success); |
| 98 | + |
| 99 | + &.hds-alert--type-page { |
| 100 | + box-shadow: 0px 1px 0px 0px var(--token-color-border-success); |
| 101 | + } |
| 102 | + |
| 103 | + &.hds-alert--type-inline { |
| 104 | + border-color: var(--token-color-border-success); |
| 105 | + } |
| 106 | + |
| 107 | + .hds-alert__icon, .hds-alert__title { |
| 108 | + color: var(--token-color-foreground-success-on-surface); |
| 109 | + } |
| 110 | +} |
| 111 | + |
| 112 | +.hds-alert--color-warning { |
| 113 | + background-color: var(--token-color-surface-warning); |
| 114 | + |
| 115 | + &.hds-alert--type-page { |
| 116 | + box-shadow: 0px 1px 0px 0px var(--token-color-border-warning); |
| 117 | + } |
| 118 | + |
| 119 | + &.hds-alert--type-inline { |
| 120 | + border-color: var(--token-color-border-warning); |
| 121 | + } |
| 122 | + |
| 123 | + .hds-alert__icon, .hds-alert__title { |
| 124 | + color: var(--token-color-foreground-warning-on-surface); |
| 125 | + } |
| 126 | +} |
| 127 | + |
| 128 | +.hds-alert--color-critical { |
| 129 | + background-color: var(--token-color-surface-critical); |
| 130 | + |
| 131 | + &.hds-alert--type-page { |
| 132 | + box-shadow: 0px 1px 0px 0px var(--token-color-border-critical); |
| 133 | + } |
| 134 | + |
| 135 | + &.hds-alert--type-inline { |
| 136 | + border-color: var(--token-color-border-critical); |
| 137 | + } |
| 138 | + |
| 139 | + .hds-alert__icon, .hds-alert__title { |
| 140 | + color: var(--token-color-foreground-critical-on-surface); |
| 141 | + } |
| 142 | +} |
| 143 | + |
| 144 | +.hds-alert--type-inline { |
| 145 | + border-width: 1px; |
| 146 | + border-style: solid; |
| 147 | + border-radius: 6px; |
| 148 | +} |
| 149 | + |
| 150 | +// |
| 151 | +// ACTIONS |
| 152 | +// |
| 153 | +.hds-alert__actions { |
| 154 | + align-items: center; |
| 155 | + display: flex; |
| 156 | + margin-top: 1rem; // 16px |
| 157 | + |
| 158 | + > * + * { |
| 159 | + margin-left: 1rem; // 16px |
| 160 | + } |
| 161 | + |
| 162 | + &:empty { |
| 163 | + display: none; |
| 164 | + } |
| 165 | +} |
0 commit comments