gristlabs_grist-core/app/client/widgets/Switch.css
Cyprien P 890a8709f3 (core) Making cells colors effective also in Card and Card List views
Summary:
 . Makes cell color work well in comparison mode
 . Do not apply cell color to the add new row
 . Allow to change color for all widget (including changing color for the checkbox and the switch widget)
 . Fix an issue that was setting color to black when opening the picker
 . Do not apply color to invalid cell

Test Plan: . Added nbrowser/CellColor

Reviewers: paulfitz, dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2720
2021-02-09 15:08:44 +01:00

49 lines
840 B
CSS

.widget_switch {
position: relative;
margin: -1px auto;
width: 30px;
height: 17px;
}
.switch_slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
border-radius: 17px;
}
.switch_slider:hover {
box-shadow: 0 0 1px #2196F3;
}
.switch_circle {
position: absolute;
cursor: pointer;
content: "";
height: 13px;
width: 13px;
left: 2px;
bottom: 2px;
background-color: white;
border-radius: 17px;
}
.switch_on > .switch_slider {
background-color: var(--grist-cell-color, #2CB0AF);
}
.switch_on > .switch_circle {
-webkit-transform: translateX(13px);
-ms-transform: translateX(13px);
transform: translateX(13px);
}
.switch_transition > .switch_slider, .switch_transition > .switch_circle {
-webkit-transition: .4s;
transition: .4s;
}