banner.css

Same filename in other branches
  1. 8.9.x core/profiles/demo_umami/themes/umami/css/components/blocks/banner/banner.css
  2. 10 core/profiles/demo_umami/themes/umami/components/banner/banner.css
  3. 11.x core/profiles/demo_umami/themes/umami/components/banner/banner.css

This file is used to style the banner block.

File

core/profiles/demo_umami/themes/umami/css/components/blocks/banner/banner.css

View source
  1. /**
  2. * @file
  3. * This file is used to style the banner block.
  4. */
  5. .block-type-banner-block {
  6. background-size: 0 0;
  7. }
  8. .block-type-banner-block .summary {
  9. margin: 1rem 4%;
  10. }
  11. .block-type-banner-block .field--name-field-title {
  12. margin: 0 0 0.5em 0;
  13. font-family: "Scope One", Georgia, serif;
  14. font-size: 1.777em;
  15. font-weight: 400;
  16. line-height: 1.2em;
  17. }
  18. .block-type-banner-block .field--name-field-summary {
  19. margin-bottom: 1.28em;
  20. font-size: 1.188em;
  21. }
  22. .block-type-banner-block .field--name-field-content-link a {
  23. display: inline-block;
  24. padding: 0.7em 1.3em;
  25. cursor: pointer;
  26. transition: background-color 0.5s ease;
  27. text-align: center;
  28. text-decoration: none;
  29. color: #fff;
  30. border: 2px solid #d93760;
  31. border-radius: 3px;
  32. background-color: #d93760;
  33. font-family: "Scope One", Georgia, serif;
  34. font-size: 1.2rem;
  35. font-weight: 400;
  36. }
  37. .block-type-banner-block .field--name-field-content-link a:focus,
  38. .block-type-banner-block .field--name-field-content-link a:hover {
  39. color: #000;
  40. border-color: #d93760;
  41. outline-color: #fff;
  42. outline-offset: 2px;
  43. background-color: #fcece7;
  44. }
  45. /* Medium */
  46. @media screen and (min-width: 48rem) { /* 768px */
  47. .block-type-banner-block {
  48. background-color: #464646;
  49. background-repeat: no-repeat;
  50. background-position: left center;
  51. background-size: cover;
  52. /* Image ratio 7:3 */
  53. }
  54. .block-type-banner-block .block-inner {
  55. display: flex;
  56. align-items: center;
  57. max-width: 1200px;
  58. height: 0; /* Required for flexbox vertical centering in IE11. Min-height will take precedence. */
  59. min-height: 54vw;
  60. margin: 0 auto;
  61. padding: 0 4%;
  62. }
  63. .block-type-banner-block .summary {
  64. flex: 0 0 50%;
  65. margin: 0;
  66. padding: 1.777em;
  67. color: #fff;
  68. border: 1px solid #464646;
  69. background: rgba(0, 0, 0, 0.42);
  70. }
  71. .block-type-banner-block .field--name-field-media-image {
  72. /**
  73. * We need to ensure that the alt text on the image is accessible to
  74. * screenreaders, so, when on large screens, let's give this the same CSS
  75. * as the .visually-hidden class has.
  76. */
  77. position: absolute !important;
  78. overflow: hidden;
  79. clip: rect(1px, 1px, 1px, 1px);
  80. width: 1px;
  81. height: 1px;
  82. word-wrap: normal;
  83. }
  84. }
  85. /* Large */
  86. @media screen and (min-width: 60rem) { /* 960px */
  87. .block-type-banner-block .summary {
  88. flex: 0 0 41%;
  89. }
  90. .block-type-banner-block .block-inner {
  91. min-height: 43vw;
  92. }
  93. }
  94. /* Extra large + side margins */
  95. @media screen and (min-width: 80rem) { /* 1200px (large) + 80px (side margins) = 1280px */
  96. .block-type-banner-block .block-inner {
  97. padding: 0;
  98. }
  99. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.