From: J. Eric Ellis Date: Wed, 21 Feb 2018 14:12:20 +0000 (-0500) Subject: Changes requested by @ncoden X-Git-Tag: v6.6.0~3^2~282^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5b4bc0f278e7b9c5a8f3ee587ede2da45ee7157;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Changes requested by @ncoden Added variables for switch-cursor-disabled and switch-opacity-disabled. Altered css selector to use class instead of element. Added reduced opacity for disabled switches. Fixed line spacing for comment. --- diff --git a/scss/components/_switch.scss b/scss/components/_switch.scss index 4b62160c7..481e0dc77 100644 --- a/scss/components/_switch.scss +++ b/scss/components/_switch.scss @@ -54,6 +54,14 @@ $switch-paddle-radius: $global-radius !default; /// @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 @@ -208,9 +216,10 @@ $switch-paddle-transition: all 0.25s ease-out !default; // element .switch-input { @include switch-input; - // indicate a disabled switch - &:disabled ~ label { - cursor: not-allowed; + // indicate a disabled switch + &:disabled ~ .switch-paddle { + cursor: $switch-cursor-disabled; + opacity: $switch-opacity-disabled; } }