Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Polish OcSwitch #2018

Merged
merged 2 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/enhancement-polish-oc-switch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Polish OcSwitch

We've adjusted the OcSwitch to fit the redesign

https://github.com/owncloud/web/issues/6492
https://github.com/owncloud/owncloud-design-system/pull/2018
15 changes: 8 additions & 7 deletions src/components/atoms/OcSwitch/OcSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,32 @@ export default {
gap: var(--oc-space-small);

&-btn {
border: 1px solid var(--oc-color-input-border);
border: 1px solid var(--oc-color-input-bg);
border-radius: 20px;
cursor: pointer;
display: block;
height: 16px;
height: 18px;
margin: 0;
padding: 0;
position: relative;
transition: background-color 0.25s;
width: 29px;
width: 31px;

&::before {
background-color: var(--oc-color-input-bg);
background-color: var(--oc-color-swatch-inverse-hover);
box-shadow: rgb(0 0 0 / 25%) 0px 0px 2px 1px;
border-radius: 50%;
content: "";
height: 12px;
left: 1px;
position: absolute;
top: 1px;
top: 2px;
transition: transform 0.25s;
width: 12px;
}

&[aria-checked="false"] {
background-color: var(--oc-color-input-text-muted);
background-color: var(--oc-color-swatch-inverse-muted);

&::before {
transform: translateX(0);
Expand All @@ -109,7 +110,7 @@ export default {
}

&[aria-checked="true"] {
background-color: var(--oc-color-input-text-default);
background-color: var(--oc-color-swatch-primary-default);

&::before {
transform: translateX(calc(100% + 1px));
Expand Down