Commit de62d3b4 authored by Jacopo's avatar Jacopo

Expand/collapse button -> Change to make it look like a toggle

Changed the expand/collapse button to look different when is
opened/closed
parent ae52d1a4
...@@ -22,6 +22,7 @@ $(() => { ...@@ -22,6 +22,7 @@ $(() => {
} }
$('body').on('click', '.js-toggle-button', function toggleButton(e) { $('body').on('click', '.js-toggle-button', function toggleButton(e) {
e.target.classList.toggle('open');
toggleContainer($(this).closest('.js-toggle-container')); toggleContainer($(this).closest('.js-toggle-container'));
const targetTag = e.currentTarget.tagName.toLowerCase(); const targetTag = e.currentTarget.tagName.toLowerCase();
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
.text-expander { .text-expander {
display: inline-block; display: inline-block;
background: $gray-light; background: $white-light;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
padding: 0 5px; padding: 0 5px;
cursor: pointer; cursor: pointer;
...@@ -146,6 +146,11 @@ ...@@ -146,6 +146,11 @@
line-height: $gl-font-size; line-height: $gl-font-size;
outline: none; outline: none;
&.open {
background: $gray-light;
box-shadow: inset 0 0 2px rgba($black, 0.2);
}
&:hover { &:hover {
background-color: darken($gray-light, 10%); background-color: darken($gray-light, 10%);
text-decoration: none; text-decoration: none;
......
---
title: Expand/collapse button -> Change to make it look like a toggle
merge_request: 10720
author: Jacopo Beschi @jacopo-beschi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment