Skip to content

Commit

Permalink
Update: replace notify button icon duplicate styles with mixin (fixes #…
Browse files Browse the repository at this point in the history
…443) (#448)

* create mixin for notify icon button styles

* replace notifyPush close button styles with mixin

* replace hotgraphicPopup icon button styles with mixin

* replace tutor close button styles with mixin
  • Loading branch information
kirsty-hames authored Jul 4, 2023
1 parent 1a8bd41 commit bf2f2e6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 44 deletions.
28 changes: 17 additions & 11 deletions less/core/notify.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,7 @@
}

&__btn-icon {
margin: @btn-margin / 2;
padding: @btn-padding / 2;
background-color: @notify-icon;
color: @notify-icon-inverted;
border-radius: 50%;

.no-touch &:not(.is-disabled):not(.is-locked):hover {
background-color: @notify-icon-hover;
color: @notify-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}
.notify-btn-icon;
}

&__close-btn {
Expand All @@ -109,3 +99,19 @@
// }
// }
}

// Global Notify button icon
// --------------------------------------------------
.notify-btn-icon() {
margin: @btn-margin / 2;
padding: @btn-padding / 2;
background-color: @notify-icon;
color: @notify-icon-inverted;
border-radius: 50%;

.no-touch &:not(.is-disabled):not(.is-locked):hover {
background-color: @notify-icon-hover;
color: @notify-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}
}
12 changes: 1 addition & 11 deletions less/core/notifyPush.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,7 @@
position: absolute;
top: 0;
right: 0;
margin: @btn-margin / 2;
padding: @btn-padding / 2;
background-color: @notify-icon;
color: @notify-icon-inverted;
border-radius: 50%;

.no-touch &:not(.is-disabled):not(.is-locked):hover {
background-color: @notify-icon-hover;
color: @notify-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}
.notify-btn-icon;

.dir-rtl & {
right: auto;
Expand Down
12 changes: 1 addition & 11 deletions less/plugins/adapt-contrib-hotgraphic/hotgraphicPopup.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@

&__controls,
&__close {
margin: @btn-margin / 2;
padding: @btn-padding / 2;
background-color: @notify-icon;
color: @notify-icon-inverted;
border-radius: 50%;

.no-touch &:not(.is-disabled):not(.is-locked):hover {
background-color: @notify-icon-hover;
color: @notify-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}
.notify-btn-icon;
}

&__item-title {
Expand Down
12 changes: 1 addition & 11 deletions less/plugins/adapt-contrib-tutor/tutor.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,7 @@
}

&__btn-icon {
margin: @btn-margin / 2;
padding: @btn-padding / 2;
background-color: @notify-icon;
color: @notify-icon-inverted;
border-radius: 50%;

.no-touch &:not(.is-disabled):not(.is-locked):hover {
background-color: @notify-icon-hover;
color: @notify-icon-inverted-hover;
.transition(background-color @duration ease-in, color @duration ease-in;);
}
.notify-btn-icon;
}

// overlay
Expand Down

0 comments on commit bf2f2e6

Please sign in to comment.