_select-group.scss 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .selectgroup {
  2. display: -ms-inline-flexbox;
  3. display: inline-flex;
  4. }
  5. .selectgroup-item {
  6. -ms-flex-positive: 1;
  7. flex-grow: 1;
  8. position: relative;
  9. +.selectgroup-item {
  10. margin-inline-start: -1px;
  11. }
  12. &:not(:first-child) .selectgroup-button {
  13. border-start-start-radius: 0;
  14. border-end-start-radius: 0;
  15. }
  16. &:not(:last-child) .selectgroup-button {
  17. border-start-end-radius: 0;
  18. border-end-end-radius: 0;
  19. }
  20. }
  21. .selectgroup-input {
  22. opacity: 0;
  23. position: absolute;
  24. z-index: -1;
  25. inset-block-start: 0;
  26. inset-inline-start: 0;
  27. }
  28. .selectgroup-button {
  29. display: block;
  30. border: 1px solid $border;
  31. text-align: center;
  32. padding: 0.375rem 1rem;
  33. position: relative;
  34. cursor: pointer;
  35. border-radius: 5px;
  36. color: #9aa0ac;
  37. -webkit-user-select: none;
  38. -moz-user-select: none;
  39. -ms-user-select: none;
  40. user-select: none;
  41. font-size: 0.875rem;
  42. line-height: 1.5rem;
  43. min-width: 2.375rem;
  44. }
  45. .selectgroup-input {
  46. &:checked+.selectgroup-button {
  47. z-index: 1;
  48. background: $primary-01;
  49. }
  50. &:focus+.selectgroup-button {
  51. z-index: 2;
  52. box-shadow: 0 0 0 2px rgba(98, 58, 162, 0.25);
  53. }
  54. }
  55. .selectgroup-pills {
  56. -ms-flex-wrap: wrap;
  57. flex-wrap: wrap;
  58. -ms-flex-align: start;
  59. align-items: flex-start;
  60. .selectgroup-item {
  61. margin-inline-end: .5rem;
  62. -ms-flex-positive: 0;
  63. flex-grow: 0;
  64. }
  65. .selectgroup-button {
  66. border-radius: 5px !important;
  67. }
  68. }