-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8278 from ever-co/fix/theme-selector-style
[Fix] styles for switch theme
- Loading branch information
Showing
1 changed file
with
83 additions
and
61 deletions.
There are no files selected for viewing
144 changes: 83 additions & 61 deletions
144
packages/desktop-ui-lib/src/lib/theme-selector/switch-theme/switch-theme.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,96 @@ | ||
@import 'var'; | ||
|
||
:host .switch-container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
|
||
nb-toggle.switch ::ng-deep .toggle { | ||
height: 1.5rem; | ||
width: 3.375rem; | ||
font-family: 'Font Awesome 6 Free' !important; | ||
font-size: .625rem; | ||
display: flex; | ||
align-items: center; | ||
background-color: rgba(126, 126, 143, 0.5); | ||
border-width: 0; | ||
.toggle-switcher{ | ||
height: 1rem; | ||
width: 1rem; | ||
} | ||
span { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
justify-self: flex-end; | ||
} | ||
nb-toggle.switch ::ng-deep .toggle { | ||
height: 1.5rem; | ||
width: 3.375rem; | ||
font-family: 'Font Awesome 6 Free' !important; | ||
font-size: .625rem; | ||
display: flex; | ||
align-items: center; | ||
background-color: rgba(126, 126, 143, 0.5); | ||
border-width: 0; | ||
|
||
nb-icon{ | ||
display: none; | ||
} | ||
} | ||
nb-toggle.light ::ng-deep .toggle { | ||
justify-content: end; | ||
&:before { | ||
content: '\f186'; | ||
@include nb-rtl(margin-left, .275rem); | ||
@include nb-ltr(margin-right, .275rem); | ||
color: rgba(255, 255, 255, 0.25); | ||
} | ||
span { | ||
&:before { | ||
content: '\f185'; | ||
} | ||
} | ||
.toggle-switcher{ | ||
@include nb-ltr(margin-left, .25rem); | ||
@include nb-rtl(margin-right, .25rem); | ||
} | ||
} | ||
.toggle-switcher { | ||
height: 1rem; | ||
width: 1rem; | ||
@include nb-rtl(left, 3px !important); | ||
@include nb-ltr(right, 3px !important); | ||
} | ||
|
||
nb-toggle.dark ::ng-deep .toggle { | ||
justify-content: flex-start; | ||
&:before { | ||
content: '\f185'; | ||
@include nb-ltr(margin-left, .325rem); | ||
@include nb-rtl(margin-right, .325rem); | ||
color: rgba(255, 255, 255, 0.25); | ||
} | ||
span { | ||
&:before { | ||
content: '\f186'; | ||
} | ||
} | ||
} | ||
span { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
justify-self: flex-end; | ||
} | ||
|
||
nb-icon { | ||
display: none; | ||
} | ||
} | ||
|
||
nb-toggle.light ::ng-deep .toggle { | ||
justify-content: end; | ||
|
||
&:before { | ||
content: '\f186'; | ||
position: absolute; | ||
@include nb-rtl(right, 6px); | ||
@include nb-ltr(left, 6px); | ||
color: rgba(255, 255, 255, 0.5); | ||
animation: slide 0.4s ease-out forwards; | ||
} | ||
|
||
span { | ||
&:before { | ||
content: '\f185'; | ||
} | ||
} | ||
|
||
.toggle-switcher { | ||
@include nb-ltr(margin-left, .25rem); | ||
@include nb-rtl(margin-right, .25rem); | ||
} | ||
} | ||
|
||
nb-toggle.dark ::ng-deep .toggle { | ||
justify-content: flex-start; | ||
|
||
&:before { | ||
content: '\f185'; | ||
@include nb-ltr(margin-left, .325rem); | ||
@include nb-rtl(margin-right, .325rem); | ||
color: rgba(255, 255, 255, 0.5); | ||
animation: slide 0.4s ease-out forwards; | ||
} | ||
|
||
span { | ||
&:before { | ||
content: '\f186'; | ||
} | ||
} | ||
} | ||
} | ||
|
||
::ng-deep [dir=ltr] nb-toggle.switch .toggle.checked .toggle-switcher { | ||
left: calc(100% - 1.375rem); | ||
left: calc(100% - 1.375rem); | ||
} | ||
|
||
::ng-deep [dir=rtl] nb-toggle.switch .toggle.checked .toggle-switcher { | ||
right: calc(100% - 1.375rem); | ||
right: calc(100% - 1.375rem); | ||
} | ||
|
||
@keyframes slide { | ||
from { | ||
transform: translateX(300%); | ||
} | ||
to { | ||
transform: translateX(0%); | ||
} | ||
} |