-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): implementation of layout for locked toggle (#1296)
- Loading branch information
1 parent
81f6bad
commit d4151d8
Showing
5 changed files
with
73 additions
and
35 deletions.
There are no files selected for viewing
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
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
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,45 +1,71 @@ | ||
.switch-container { | ||
display: inline-flex; | ||
align-content: flex-end; | ||
margin: @light-spacing 0; | ||
align-items: center; | ||
|
||
.is-small { | ||
transform: scale(0.75); | ||
transform-origin: 0; | ||
} | ||
|
||
.switch-label { | ||
display: inline-block; | ||
margin-left: 10px; | ||
padding-top: 3px; | ||
} | ||
|
||
.is-small-label { | ||
padding-top: 4.5px; | ||
margin-left: -5px; | ||
font-size: 12px; | ||
} | ||
|
||
.switch-button-control { | ||
display: inline-block; | ||
|
||
.switch-button { | ||
.sw-button { | ||
height: calc(1.6em - (2 * 2px)); | ||
width: calc(1.6em - (2 * 2px)); | ||
border-radius: calc(1.6em - (2 * 2px)); | ||
transition: all @animation-speed-micro ease-in-out; | ||
} | ||
height: 1.6em; | ||
width: calc(1.6em * 2); | ||
border-radius: 1.6em; | ||
position: relative; | ||
height: 1.6rem; | ||
width: calc(1.6rem * 2); | ||
border-radius: 1.6rem; | ||
transition: all @animation-speed-micro ease-in-out; | ||
cursor: pointer; | ||
} | ||
.switch-button.enabled { | ||
|
||
.sw-button { | ||
transform: translateX(calc(calc(1.6em - (2 * 2px)) + (2 * 2px))); | ||
position: absolute; | ||
top: 50%; | ||
height: calc(1.6rem - (2 * 0.125rem) - 0.125rem); | ||
width: calc(1.6rem - (2 * 0.125rem) - 0.125rem); | ||
border-radius: calc(1.6rem - (2 * 0.125rem) - 0.125rem); | ||
transition: transform @animation-speed-micro ease-in-out; | ||
transform: translateY(-50%) translateX(1px); | ||
} | ||
|
||
&.enabled { | ||
box-shadow: none; | ||
|
||
.sw-button { | ||
height: calc(1.6rem - (2 * 0.125rem)); | ||
width: calc(1.6rem - (2 * 0.125rem)); | ||
border-radius: calc(1.6rem - (2 * 0.125rem)); | ||
transform: translateY(-50%) | ||
translateX(calc(calc(1.6rem - (2 * 0.125rem)) + (2 * 0.125rem))); | ||
} | ||
} | ||
|
||
&.locked { | ||
border-color: @gray; | ||
.sw-button { | ||
border-color: @gray; | ||
background: @gray !important; | ||
box-shadow: -5px 0px 20px -2px @gray !important; | ||
} | ||
} | ||
box-shadow: none; | ||
} | ||
|
||
.switch-button-label { | ||
margin-left: 10px; | ||
} | ||
display: inline-block; | ||
} | ||
display: inline-flex; | ||
align-content: flex-end; | ||
margin: @light-spacing 0; | ||
align-items: center; | ||
} |
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
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