Skip to content

Fix style-lint warnings for `app/assets/stylesheets/framework/toggle.scss`

What does this MR do?

  1. Fixes the following stylelint warnings (from #27767 (closed)):
  87:5  ⚠  ".toggle-icon" and ".toggle-status-checked (app/assets/stylesheets/framework/toggle.scss -67:5)" have the same properties.   stylelint-gitlab/duplicate-selectors
 113:7  ⚠  ".toggle-status-checked" and ".toggle-status-unchecked (app/assets/stylesheets/framework/toggle.scss -71:5)" have the same   stylelint-gitlab/duplicate-selectors
           properties.
 117:7  ⚠  ".toggle-status-unchecked" and ".toggle-icon (app/assets/stylesheets/framework/toggle.scss -87:5)" have the same             stylelint-gitlab/duplicate-selectors
           properties.
  1. Updates toggle to use Pajamas-conforming blue (gl-blue-500)
  2. Fixes icon alignment
  3. Update icon to use GlIcon component

Follow-up to improve specs: !38544 (merged)

Screenshots

"On" state

Before After
Screen_Shot_2020-08-04_at_12.24.26_pm Screen_Shot_2020-08-04_at_11.51.18_am

"Off" state

Before After
Screen_Shot_2020-08-04_at_12.24.50_pm Screen_Shot_2020-08-04_at_12.25.53_pm

Disabled state

Before After
Screen_Shot_2020-08-04_at_12.24.42_pm Screen_Shot_2020-08-04_at_11.52.27_am
Screen_Shot_2020-08-04_at_12.24.52_pm Screen_Shot_2020-08-04_at_12.25.55_pm

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Tom Quirk

Merge request reports