Skip to content

Commit

Permalink
Add icon_button disabled and active style
Browse files Browse the repository at this point in the history
We should not use the button with label (tooltip) for this
behavior, but let the button have it.
  • Loading branch information
tvdeyen committed Dec 11, 2023
1 parent 14641b9 commit e6ef793
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions app/assets/stylesheets/alchemy/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ input.button {
}

.icon_button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
margin: 0;
padding: 0;
overflow: hidden;
text-shadow: none;
border-radius: $default-border-radius;

Expand All @@ -66,7 +66,9 @@ input.button {
border: none;
}

&:hover {
&.active,
&:active,
&:hover:not([disabled]):not(.disabled):not(.linked) {
text-decoration: none;
background-color: $default-border-color;
cursor: pointer;
Expand All @@ -79,25 +81,23 @@ input.button {

&.disabled,
&[disabled] {
span {
opacity: 0.3;
cursor: not-allowed;
}
pointer-events: none;

i {
opacity: 0.3;
}

&:hover {
cursor: not-allowed;
text-decoration: none;
cursor: default;
}
}

&.linked {
@include linked-button;
}

&:focus {
&:focus:not(.disabled):not([disabled]) {
@include default-focus-style;
}
}
Expand Down Expand Up @@ -125,15 +125,6 @@ button.icon_button {
justify-content: center;
text-align: center;

&.active,
&:active,
&:hover {
.icon_button:not([disabled]) {
background-color: $default-border-color;
cursor: pointer;
}
}

.select2-container,
select {
margin: 0;
Expand Down

0 comments on commit e6ef793

Please sign in to comment.