vendor/assets/scss/components/_switch.scss in foundation-rails-6.5.3.0 vs vendor/assets/scss/components/_switch.scss in foundation-rails-6.6.1.0
- old
+ new
@@ -52,10 +52,18 @@
/// switch transition.
/// @type Number
$switch-paddle-transition: all 0.25s ease-out !default;
+/// Opacity of a disabled switch.
+/// @type Number
+$switch-opacity-disabled: .5 !default;
+
+/// Cursor for a disabled switch.
+/// @type Cursor
+$switch-cursor-disabled: not-allowed !default;
+
// make them variables
// ask about accessibility on label
// change class name for text
/// Adds styles for a switch container. Apply this to a container class.
@@ -128,9 +136,15 @@
background: $switch-background-active;
&::after {
#{$global-left}: $paddle-active-offest;
}
+ }
+
+ // indicate a disabled switch
+ input:disabled ~ & {
+ cursor: $switch-cursor-disabled;
+ opacity: $switch-opacity-disabled;
}
input:focus ~ & {
@include disable-mouse-outline;
}