|
55 | 55 | $height: length($textLines) * 25 + 30; // number of lines * 25 (line height) + 30 (padding top and bottom) |
56 | 56 |
|
57 | 57 | @if $errorType == error { |
58 | | - $border-svg: $border-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
59 | | - $bg-svg: $bg-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
60 | | - $text-svg: $text-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 58 | + $border-svg: $checka11y-border-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 59 | + $bg-svg: $checka11y-bg-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 60 | + $text-svg: $checka11y-text-error; // stylelint-disable-line scss/no-duplicate-dollar-variables |
61 | 61 | border-color: var(--checka11y-border-error); |
62 | 62 | } |
63 | 63 | @else if $errorType == warning { |
64 | | - $border-svg: $border-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
65 | | - $bg-svg: $bg-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
66 | | - $text-svg: $text-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 64 | + $border-svg: $checka11y-border-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 65 | + $bg-svg: $checka11y-bg-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
| 66 | + $text-svg: $checka11y-text-warning; // stylelint-disable-line scss/no-duplicate-dollar-variables |
67 | 67 | border-color: var(--checka11y-border-warning); |
68 | 68 | } |
69 | 69 | @else { |
70 | 70 | @error "The $errorType must be either 'error' or 'warning' and the $code must start with either 'E' or 'W' respectively."; |
71 | 71 | } |
72 | | - background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="#{$width}px" height="#{$height}px" viewBox="0 0 #{$width} #{$height}"><rect class="box" x="4" y="4" width="#{$width - 8}" height="#{$height - 8}" rx="12" ry="12" fill="#{transparentize($bg-svg, 0.000001)}" stroke-width="0.4rem" stroke="#{transparentize($border-svg, 0.000001)}" /><g fill="#{transparentize($text-svg, 0.000001)}" font-size="#{$font-size}" font-weight="#{$font-weight}" font-family="#{$font-family}" font-style="initial" letter-spacing="initial" text-decoration="none" text-transform="initial" text-shadow="none">#{$textLines}</g></svg>'); |
| 72 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="#{$width}px" height="#{$height}px" viewBox="0 0 #{$width} #{$height}"><rect class="box" x="4" y="4" width="#{$width - 8}" height="#{$height - 8}" rx="12" ry="12" fill="#{transparentize($bg-svg, 0.000001)}" stroke-width="0.4rem" stroke="#{transparentize($border-svg, 0.000001)}" /><g fill="#{transparentize($text-svg, 0.000001)}" font-size="#{$checka11y-font-size}" font-weight="#{$checka11y-font-weight}" font-family="#{$checka11y-font-family}" font-style="initial" letter-spacing="initial" text-decoration="none" text-transform="initial" text-shadow="none">#{$textLines}</g></svg>'); |
73 | 73 | background-position: bottom center; |
74 | 74 | background-repeat: no-repeat; |
75 | 75 | min-width: #{$width}px; |
|
0 commit comments