icon-button.css 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. [data-component="icon-button"] {
  2. display: inline-flex;
  3. align-items: center;
  4. justify-content: center;
  5. border-radius: 100%;
  6. text-decoration: none;
  7. user-select: none;
  8. aspect-ratio: 1;
  9. &:disabled {
  10. background-color: var(--icon-strong-disabled);
  11. color: var(--icon-invert-base);
  12. cursor: not-allowed;
  13. }
  14. &:focus {
  15. outline: none;
  16. }
  17. &[data-variant="primary"] {
  18. background-color: var(--icon-strong-base);
  19. [data-slot="icon"] {
  20. /* color: var(--icon-weak-base); */
  21. color: var(--icon-invert-base);
  22. /* &:hover:not(:disabled) { */
  23. /* color: var(--icon-weak-hover); */
  24. /* } */
  25. /* &:active:not(:disabled) { */
  26. /* color: var(--icon-string-active); */
  27. /* } */
  28. }
  29. &:hover:not(:disabled) {
  30. background-color: var(--icon-strong-hover);
  31. }
  32. &:active:not(:disabled) {
  33. background-color: var(--icon-string-active);
  34. }
  35. &:focus:not(:disabled) {
  36. background-color: var(--icon-strong-focus);
  37. }
  38. &:disabled {
  39. background-color: var(--icon-strong-disabled);
  40. [data-slot="icon"] {
  41. color: var(--icon-invert-base);
  42. }
  43. }
  44. }
  45. &[data-variant="secondary"] {
  46. background-color: var(--button-secondary-base);
  47. color: var(--text-strong);
  48. &:hover:not(:disabled) {
  49. background-color: var(--surface-hover);
  50. }
  51. &:active:not(:disabled) {
  52. background-color: var(--surface-active);
  53. }
  54. &:focus:not(:disabled) {
  55. background-color: var(--surface-focus);
  56. }
  57. }
  58. &[data-variant="ghost"] {
  59. background-color: transparent;
  60. [data-slot="icon"] {
  61. color: var(--icon-weak-base);
  62. &:hover:not(:disabled) {
  63. color: var(--icon-weak-hover);
  64. }
  65. &:active:not(:disabled) {
  66. color: var(--icon-string-active);
  67. }
  68. }
  69. /* color: var(--text-strong); */
  70. /**/
  71. /* &:hover:not(:disabled) { */
  72. /* background-color: var(--surface-hover); */
  73. /* } */
  74. /* &:active:not(:disabled) { */
  75. /* background-color: var(--surface-active); */
  76. /* } */
  77. /* &:focus:not(:disabled) { */
  78. /* background-color: var(--surface-focus); */
  79. /* } */
  80. }
  81. &[data-size="normal"] {
  82. width: 24px;
  83. height: 24px;
  84. font-size: var(--font-size-small);
  85. line-height: var(--line-height-large);
  86. gap: calc(var(--spacing) * 0.5);
  87. }
  88. &[data-size="large"] {
  89. height: 32px;
  90. padding: 0 8px 0 6px;
  91. gap: 8px;
  92. /* text-12-medium */
  93. font-family: var(--font-family-sans);
  94. font-size: var(--font-size-small);
  95. font-style: normal;
  96. font-weight: var(--font-weight-medium);
  97. line-height: var(--line-height-large); /* 166.667% */
  98. letter-spacing: var(--letter-spacing-normal);
  99. }
  100. }