You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
2.4 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //
  2. // Ribbon
  3. // --------------------------------------------------
  4. .ribbon {
  5. position: relative;
  6. min-height: 3.25rem;
  7. }
  8. .ribbon-box {
  9. position: absolute;
  10. top: .75rem;
  11. right: 0;
  12. padding: 0 .75rem;
  13. height: 2rem;
  14. line-height: 2rem;
  15. z-index: 5;
  16. font-weight: $font-weight-bold;
  17. border-top-left-radius: $border-radius;
  18. border-bottom-left-radius: $border-radius;
  19. &::before {
  20. position: absolute;
  21. display: block;
  22. width: 0;
  23. height: 0;
  24. content: '';
  25. }
  26. }
  27. // Bookmark variation
  28. .ribbon-bookmark {
  29. .ribbon-box {
  30. padding-left: .625rem;
  31. border-radius: 0 !important;
  32. }
  33. .ribbon-box::before {
  34. top: 0;
  35. right: 100%;
  36. height: 2rem;
  37. border: 1rem solid;
  38. border-left-width: .625rem;
  39. border-right-width: 0;
  40. }
  41. }
  42. // Modern variation
  43. .ribbon-modern {
  44. .ribbon-box {
  45. top: .75rem;
  46. right: -.5rem;
  47. padding-left: .75rem;
  48. padding-right: .75rem;
  49. border-radius: $border-radius !important;
  50. }
  51. .ribbon-box::before {
  52. display: none;
  53. }
  54. }
  55. // Position variations
  56. .ribbon-left {
  57. .ribbon-box {
  58. right: auto;
  59. left: 0;
  60. border-radius: 0;
  61. border-top-right-radius: $border-radius;
  62. border-bottom-right-radius: $border-radius;
  63. }
  64. &.ribbon-bookmark {
  65. .ribbon-box {
  66. padding-left: .75rem;
  67. padding-right: .625rem;
  68. }
  69. .ribbon-box::before {
  70. right: auto;
  71. left: 100%;
  72. border-left-width: 0;
  73. border-right-width: .625rem;
  74. }
  75. }
  76. &.ribbon-modern {
  77. .ribbon-box {
  78. left: -.5rem;
  79. }
  80. }
  81. }
  82. .ribbon-bottom {
  83. .ribbon-box {
  84. top: auto;
  85. bottom: .75rem;
  86. }
  87. }
  88. // Color variation
  89. .ribbon-light {
  90. @include ribbon-variation($body-bg-dark, $body-color);
  91. }
  92. .ribbon-dark {
  93. @include ribbon-variation($dark, $white);
  94. }
  95. .ribbon-primary {
  96. @include ribbon-variation($primary, $white);
  97. }
  98. .ribbon-success {
  99. @include ribbon-variation($success, $white);
  100. }
  101. .ribbon-info {
  102. @include ribbon-variation($info, $white);
  103. }
  104. .ribbon-warning {
  105. @include ribbon-variation($warning, $white);
  106. }
  107. .ribbon-danger {
  108. @include ribbon-variation($danger, $white);
  109. }
  110. .ribbon-glass {
  111. .ribbon-box {
  112. color: $white;
  113. background-color: rgba(255,255,255,.4);
  114. }
  115. &.ribbon-bookmark {
  116. .ribbon-box::before {
  117. border-color: rgba(255,255,255,.4);
  118. border-left-color: transparent;
  119. }
  120. &.ribbon-left .ribbon-box::before {
  121. border-color: rgba(255,255,255,.4);
  122. border-right-color: transparent;
  123. }
  124. }
  125. }