1
0

_tabs.scss 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .tabs {
  2. display: flex;
  3. flex-wrap: wrap;
  4. margin: 2rem 0 2rem 0;
  5. position: relative;
  6. &.tabs-left {
  7. justify-content: flex-start;
  8. label.tab-label {
  9. margin-right: 0.5rem;
  10. }
  11. .tab-content {
  12. border-radius: 0px 4px 4px 4px;
  13. }
  14. }
  15. &.tabs-right {
  16. justify-content: flex-end;
  17. label.tab-label {
  18. margin-left: 0.5rem;
  19. }
  20. .tab-content {
  21. border-radius: 4px 0px 4px 4px;
  22. }
  23. }
  24. input.tab-input {
  25. display: none;
  26. }
  27. label.tab-label {
  28. background-color: $alt-bg-color;
  29. border-color: $darker-alt-bg-color;
  30. border-radius: 4px 4px 0px 0px;
  31. border-style: solid;
  32. border-bottom-style: hidden;
  33. border-width: 1px;
  34. cursor: pointer;
  35. display: inline-block;
  36. order: 1;
  37. padding: 0.3rem 0.6rem;
  38. position: relative;
  39. top: 1px;
  40. user-select: none;
  41. }
  42. input.tab-input:checked + label.tab-label {
  43. background-color: $bg-color;
  44. }
  45. .tab-content {
  46. background-color: $bg-color;
  47. border-color: $darker-alt-bg-color;
  48. border-style: solid;
  49. border-width: 1px;
  50. display: none;
  51. order: 2;
  52. padding: 1rem;
  53. width: 100%;
  54. }
  55. &.tabs-code {
  56. .tab-content {
  57. padding: 0.5rem;
  58. pre {
  59. margin: 0;
  60. }
  61. }
  62. }
  63. }