_examples.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .example {
  2. padding: 2rem;
  3. margin: 1rem 0 2rem;
  4. border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
  5. border-radius: 3px 3px 0 0;
  6. position: relative;
  7. min-height: 12rem;
  8. display: flex;
  9. align-items: center;
  10. overflow-x: auto;
  11. }
  12. .example-centered {
  13. justify-content: center;
  14. .example-content {
  15. flex: 0 auto;
  16. }
  17. }
  18. .example-content {
  19. font-size: $font-size-base;
  20. line-height: $line-height-base;
  21. color: var(--#{$prefix}body-color);
  22. flex: 1;
  23. max-width: 100%;
  24. .page-header {
  25. margin-bottom: 0;
  26. }
  27. }
  28. .example-bg {
  29. background: $body-bg;
  30. }
  31. .example-code {
  32. margin: 2rem 0;
  33. border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
  34. border-top: none;
  35. pre {
  36. margin: 0;
  37. border: 0;
  38. border-radius: 0 0 3px 3px;
  39. }
  40. .example + & {
  41. margin-top: -2rem;
  42. }
  43. }
  44. .example-column {
  45. margin: 0 auto;
  46. > .card:last-of-type {
  47. margin-bottom: 0;
  48. }
  49. }
  50. .example-column-1 {
  51. max-width: 26rem;
  52. }
  53. .example-column-2 {
  54. max-width: 52rem;
  55. }
  56. .example-modal-backdrop {
  57. background: $modal-backdrop-bg;
  58. opacity: $modal-backdrop-opacity;
  59. position: absolute;
  60. width: 100%;
  61. left: 0;
  62. top: 0;
  63. height: 100%;
  64. border-radius: 2px 2px 0 0;
  65. }