CheckboxItem.scss 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @import "../css/variables.module";
  2. .excalidraw {
  3. .Checkbox {
  4. margin: 4px 0.3em;
  5. display: flex;
  6. align-items: center;
  7. cursor: pointer;
  8. user-select: none;
  9. -webkit-tap-highlight-color: transparent;
  10. &:hover:not(.is-checked) .Checkbox-box:not(:focus) {
  11. box-shadow: 0 0 0 2px #{$oc-blue-4};
  12. }
  13. &:hover:not(.is-checked) .Checkbox-box:not(:focus) {
  14. svg {
  15. display: block;
  16. opacity: 0.3;
  17. }
  18. }
  19. &:active {
  20. .Checkbox-box {
  21. box-shadow: 0 0 2px 1px inset #{$oc-blue-7} !important;
  22. }
  23. }
  24. &:hover {
  25. .Checkbox-box {
  26. background-color: fade-out($oc-blue-1, 0.8);
  27. }
  28. }
  29. &.is-checked {
  30. .Checkbox-box {
  31. background-color: #{$oc-blue-1};
  32. svg {
  33. display: block;
  34. }
  35. }
  36. &:hover .Checkbox-box {
  37. background-color: #{$oc-blue-2};
  38. }
  39. }
  40. .Checkbox-box {
  41. width: 22px;
  42. height: 22px;
  43. padding: 0;
  44. flex: 0 0 auto;
  45. margin: 0 1em;
  46. display: flex;
  47. align-items: center;
  48. justify-content: center;
  49. box-shadow: 0 0 0 2px #{$oc-blue-7};
  50. background-color: transparent;
  51. border-radius: 4px;
  52. color: #{$oc-blue-7};
  53. border: 0;
  54. &:focus {
  55. box-shadow: 0 0 0 3px #{$oc-blue-7};
  56. }
  57. svg {
  58. display: none;
  59. width: 16px;
  60. height: 16px;
  61. stroke-width: 3px;
  62. }
  63. }
  64. .Checkbox-label {
  65. display: flex;
  66. align-items: center;
  67. }
  68. .excalidraw-tooltip-icon {
  69. width: 1em;
  70. height: 1em;
  71. }
  72. }
  73. }