_utilities.dropdowns.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // =============================================================================
  2. // Arrows
  3. // =============================================================================
  4. .u-arrow:before {
  5. content: '';
  6. border: solid 0.35rem transparent;
  7. display: block;
  8. position: absolute;
  9. }
  10. .u-arrow--tl:before {
  11. bottom: 100%;
  12. // Remove once we drop support for Safari 13.
  13. // stylelint-disable-next-line property-disallowed-list
  14. left: 1rem;
  15. inset-inline-start: 1rem;
  16. }
  17. .dropup .u-arrow--tl:before {
  18. top: 100%;
  19. transform: rotateZ(180deg);
  20. }
  21. // =============================================================================
  22. // Default dropdown theme
  23. // =============================================================================
  24. // .t-default {
  25. // }
  26. .t-default .u-btn-current {
  27. border-color: rgba(0, 0, 0, 0.15);
  28. color: $color-teal;
  29. }
  30. .t-default .u-btn-current:hover {
  31. background: $color-teal;
  32. color: #fff;
  33. border-color: $color-teal;
  34. }
  35. .t-default .u-btn-current:active {
  36. background: #333;
  37. color: #fff;
  38. border-color: #333;
  39. }
  40. .t-inverted .u-btn-current {
  41. border-color: rgba(0, 0, 0, 0.35);
  42. color: #fff;
  43. }
  44. .t-inverted .u-btn-current:hover {
  45. background-color: $color-teal-darker;
  46. border-color: rgba(0, 0, 0, 0.35);
  47. }
  48. .t-inverted .u-btn-current:active {
  49. border-color: rgba(0, 0, 0, 0.35);
  50. background: #333;
  51. color: #fff;
  52. }
  53. // =============================================================================
  54. // Dark theme
  55. // =============================================================================
  56. .t-dark .u-link {
  57. color: #fff;
  58. }
  59. .t-dark .u-link:hover {
  60. color: #aaa;
  61. }
  62. .t-dark .u-background {
  63. background: #333;
  64. }
  65. .t-dark .u-arrow:before {
  66. border-bottom-color: #333;
  67. }
  68. // =============================================================================
  69. // Light theme
  70. // =============================================================================
  71. .t-light .u-link {
  72. color: #333;
  73. }
  74. .t-light .u-link:hover {
  75. color: #aaa;
  76. }
  77. .t-light .u-background {
  78. background: #fff;
  79. border-color: #ccc;
  80. }
  81. .t-light .u-arrow:before {
  82. border-bottom-color: #fff;
  83. }
  84. // =============================================================================
  85. // States
  86. // =============================================================================
  87. .u-toggle {
  88. display: none;
  89. }
  90. .is-open .u-toggle {
  91. display: block;
  92. }