.carousel-control-prev {
inset-inline-start: 0;
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
- background-image: if(sass($enable-gradients): linear-gradient(90deg, rgba($black, .25), rgba($black, .001)); else: null);
+ background-image: if(sass($enable-gradients): linear-gradient(90deg, rgb(0 0 0 / .25), rgb(0 0 0 / .001)); else: null);
}
.carousel-control-next {
inset-inline-end: 0;
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
- background-image: if(sass($enable-gradients): linear-gradient(270deg, rgba($black, .25), rgba($black, .001)); else: null);
+ background-image: if(sass($enable-gradients): linear-gradient(270deg, rgb(0 0 0 / .25), rgb(0 0 0 / .001)); else: null);
}
// Icons for within
}
// Return opaque color
-// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
+// opaque(#fff, rgb(0 0 0 / .5)) => #808080
@function opaque($background, $foreground) {
@return color-mix(in srgb, rgba($foreground, 1), $background, color.opacity($foreground) * 100%);
}
}
.placeholder-wave {
- mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, calc(1 - var(--placeholder-opacity-min))) 75%, $black 95%);
+ mask-image: linear-gradient(130deg, $black 55%, rgb(0 0 0 / calc(1 - var(--placeholder-opacity-min))) 75%, $black 95%);
mask-size: 200% 100%;
animation: placeholder-wave 2s linear infinite;
}
--btn-border-hover-mix-amount: 12.5%,
--btn-border-active-mix-amount: 20%,
--btn-shadow: "0 1px 2px rgb(0 0 0 / 15%), inset 0 1px 0 rgb(255 255 255 / 10%)",
- --btn-active-shadow: inset 0 2px 4px rgba(0, 0, 0, .15) ,
+ --btn-active-shadow: inset 0 2px 4px rgb(0 0 0 / .15) ,
),
$button-styled-tokens
);
-@use "../colors" as *;
@use "../config" as *;
@use "../functions" as *;
@use "../mixins/border-radius" as *;
text-align: var(--body-text-align);
background-color: var(--bg-body); // 2
-webkit-text-size-adjust: 100%; // 3
- -webkit-tap-highlight-color: rgba($black, 0); // 4
+ -webkit-tap-highlight-color: transparent; // 4
}
// scss-docs-end reboot-body-rules
-@use "../colors" as *;
@use "../functions" as *;
@use "../mixins/focus-ring" as *;
@use "../mixins/tokens" as *;
border: var(--switch-border-width) solid var(--switch-border-color);
// stylelint-disable-next-line property-disallowed-list
border-radius: 10rem;
- box-shadow: inset 0 1px 2px rgba($black, .05);
+ box-shadow: inset 0 1px 2px rgb(0 0 0 / .05);
// stylelint-disable-next-line property-disallowed-list
transition: .15s ease-in-out;
transition-property: padding-inline-start, background-color;
background-color: var(--theme-contrast, var(--switch-indicator-bg));
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
- box-shadow: 0 1px 2px rgba($black, .1);
+ box-shadow: 0 1px 2px rgb(0 0 0 / .1);
}
input {
$color,
$icon,
$tooltip-color: color-contrast($color),
- $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
+ $tooltip-bg-color: color-mix(in oklch, #{$color #form-feedback-tooltip-opacity}, transparent),
$focus-ring-color: null, // mdo-do: fix
$border-color: $color
) {
$color,
$icon,
$tooltip-color: color-contrast($color),
- $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
- $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity),
+ $tooltip-bg-color: color-mix(in oklch, #{$color $form-feedback-tooltip-opacity}, transparent),
+ $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width color-mix(in oklch, #{$color $input-btn-focus-color-opacity}, transparent),
$border-color: $color
) {
.#{$state}-feedback {
background-image: radial-gradient(circle, $inner-color, $outer-color);
}
-@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
+@mixin gradient-striped($color: rgb(255 255 255 / .15), $angle: 45deg) {
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
}
// scss-docs-end gradient-mixins
@include assert() {
@include output() {
.test {
- @include box-shadow(0 0 10px rgba(0, 0, 0, .5));
+ @include box-shadow(0 0 10px rgb(0 0 0 / .5));
}
}
@include expect() {
.test {
- box-shadow: 0 0 10px rgba(0, 0, 0, .5);
+ box-shadow: 0 0 10px rgb(0 0 0 / .5);
}
}
}
@include assert() {
@include output() {
.test {
- @include box-shadow(0 0 10px rgba(0, 0, 0, .5), 0 0 20px rgba(0, 0, 0, .3));
+ @include box-shadow(0 0 10px rgb(0 0 0 / .5), 0 0 20px rgb(0 0 0 / .3));
}
}
@include expect() {
.test {
- box-shadow: 0 0 10px rgba(0, 0, 0, .5), 0 0 20px rgba(0, 0, 0, .3);
+ box-shadow: 0 0 10px rgb(0 0 0 / .5), 0 0 20px rgb(0 0 0 / .3);
}
}
}
@include assert() {
@include output() {
.test {
- @include box-shadow(null, 0 0 10px rgba(0, 0, 0, .5), null);
+ @include box-shadow(null, 0 0 10px rgb(0 0 0 / .5), null);
}
}
@include expect() {
.test {
- box-shadow: 0 0 10px rgba(0, 0, 0, .5);
+ box-shadow: 0 0 10px rgb(0 0 0 / .5);
}
}
}
@include assert() {
@include output() {
.test {
- @include box-shadow(none, 0 0 10px rgba(0, 0, 0, .5));
+ @include box-shadow(none, 0 0 10px rgb(0 0 0 / .5));
}
}
@include assert() {
@include output() {
.test {
- @include box-shadow(0 0 10px rgba(0, 0, 0, .5));
+ @include box-shadow(0 0 10px rgb(0 0 0 / .5));
}
}
@include it("should handle rgba colors correctly") {
// Test case: Test with rgba colors
- $test-background: rgba(118, 118, 118, 1); // Same as #767676
+ $test-background: rgb(118 118 118 / 1); // Same as #767676
$result: color-contrast($test-background);
@include assert-equal($result, $white, "Should handle rgba colors correctly");