Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

button-bar.css 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. :root {
  2. --button-bar-active-color: var(--button-bar-active-text-color);
  3. --button-bar-border-top: 1px solid var(--button-bar-color);
  4. --button-bar-border-bottom: 1px solid var(--button-bar-color);
  5. --button-bar-border: 0 solid var(--button-bar-color);
  6. --button-bar-border-radius: 4px;
  7. --button-bar: {
  8. @apply(--reset-font);
  9. display: inline-flex;
  10. align-items: stretch;
  11. align-content: stretch;
  12. flex-wrap: nowrap;
  13. margin: 0;
  14. padding: 0;
  15. border: none;
  16. }
  17. --button-bar__item: {
  18. @apply(--reset-font);
  19. border-radius: 0;
  20. width: 100%;
  21. padding: 0;
  22. margin: 0;
  23. }
  24. }
  25. /*~
  26. name: Button Bar
  27. category: Segment
  28. markup: |
  29. <div class="button-bar" style="width:280px;">
  30. <div class="button-bar__item">
  31. <button class="button-bar__button">One</button>
  32. </div>
  33. <div class="button-bar__item">
  34. <button class="button-bar__button">Two</button>
  35. </div>
  36. <div class="button-bar__item">
  37. <button class="button-bar__button">Three</button>
  38. </div>
  39. </div>
  40. */
  41. .button-bar {
  42. @apply(--button-bar);
  43. }
  44. .button-bar__item {
  45. @apply(--button-bar__item);
  46. @apply(--hide-input-parent);
  47. overflow: hidden;
  48. box-sizing: border-box;
  49. }
  50. .button-bar__button {
  51. @apply(--reset-font);
  52. border-radius: 0;
  53. background-color: transparent;
  54. color: var(--button-bar-color);
  55. border: 1px solid var(--button-bar-color);
  56. border-top-width: 1px;
  57. border-bottom-width: 1px;
  58. border-right-width: 1px;
  59. border-left-width: 0;
  60. font-weight: var(--font-weight);
  61. padding: 0;
  62. font-size: 13px;
  63. height: 27px;
  64. line-height: 27px;
  65. width: 100%;
  66. transition: background-color 0.2s linear, color 0.2s linear;
  67. box-sizing: border-box;
  68. }
  69. .button-bar__button:disabled {
  70. @apply(--disabled);
  71. }
  72. .button-bar__button:hover {
  73. transition: none;
  74. }
  75. .button-bar__button:focus {
  76. outline: 0;
  77. }
  78. :checked + .button-bar__button {
  79. background-color: var(--button-bar-color);
  80. color: var(--button-bar-active-color);
  81. transition: none;
  82. }
  83. .button-bar__button:active,
  84. :active + .button-bar__button {
  85. background-color: var(--button-bar-active-background-color);
  86. border: var(--button-bar-border);
  87. border-top: var(--button-bar-border-top);
  88. border-bottom: var(--button-bar-border-bottom);
  89. border-right: 1px solid var(--button-bar-color);
  90. font-size: 13px;
  91. width: 100%;
  92. transition: none;
  93. }
  94. .button-bar__item:first-child > .button-bar__button {
  95. border-left-width: 1px;
  96. border-radius: var(--button-bar-border-radius) 0 0 var(--button-bar-border-radius);
  97. }
  98. .button-bar__item:last-child > .button-bar__button {
  99. border-right-width: 1px;
  100. border-radius: 0 var(--button-bar-border-radius) var(--button-bar-border-radius) 0;
  101. }