layout-content-narrow.css

Same filename and directory in other branches
  1. 10 core/themes/olivero/css/layout/layout-content-narrow.css
  2. 11.x core/themes/olivero/css/layout/layout-content-narrow.css
  3. 9 core/themes/olivero/css/layout/layout-content-narrow.css

Grid system definition for the content narrow layout.

File

core/themes/olivero/css/layout/layout-content-narrow.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Grid system definition for the content narrow layout.
  10. */
  11. .layout--content-narrow,
  12. .layout--pass--content-narrow > * {
  13. grid-column: 1 / 7;
  14. width: 100%;
  15. @media (min-width: 43.75rem) {
  16. grid-column: 2 / 14;
  17. }
  18. @media (min-width: 62.5rem) {
  19. grid-column: 3 / 11;
  20. }
  21. }
  22. /*
  23. If .layout--content-narrow is nested within any of the following, allocate the appropriate
  24. amount of columns within its parent .grid-full.
  25. - .layout--content-narrow class.
  26. - Element that's inheriting the layout--content-narrow styles from its parent region.
  27. - .layout--content-medium class.
  28. - Element that's inheriting the layout--content-medium styles from its parent region.
  29. */
  30. .layout--content-narrow,
  31. .layout--pass--content-narrow > *,
  32. .layout--content-medium,
  33. .layout--pass--content-medium > * {
  34. & .layout--content-narrow,
  35. & .layout--pass--content-narrow > * {
  36. @media (min-width: 43.75rem) {
  37. grid-column: 1 / 13;
  38. }
  39. @media (min-width: 62.5rem) {
  40. grid-column: 1 / 9;
  41. }
  42. }
  43. }
  44. /*
  45. Special grid-breaking treatment for text-content elements that
  46. reside in a content-narrow layout.
  47. */
  48. .layout--content-narrow,
  49. .layout--pass--content-narrow > * {
  50. &.text-content,
  51. & .text-content {
  52. & blockquote {
  53. &::before {
  54. @media (min-width: 43.75rem) {
  55. inset-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
  56. }
  57. }
  58. &::after {
  59. @media (min-width: 43.75rem) {
  60. inset-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
  61. width: var(--sp);
  62. height: calc(100% - 2.8125rem);
  63. margin-inline-start: 2px;
  64. }
  65. }
  66. @media (min-width: 43.75rem) {
  67. width: calc(10 * var(--grid-col-width) + 9 * var(--grid-gap));
  68. margin-block: var(--sp3);
  69. padding-inline-start: 0;
  70. }
  71. }
  72. & pre {
  73. @media (min-width: 43.75rem) {
  74. margin-block: var(--sp3);
  75. }
  76. @media (min-width: 62.5rem) {
  77. width: calc(12 * var(--grid-col-width) + 11 * var(--grid-gap));
  78. margin-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
  79. }
  80. }
  81. }
  82. }
  83. /**
  84. *
     and 
    elements should not break containers and overflow
  85. * into sidebar region when present.
  86. */
  87. .sidebar-grid {
  88. & .layout--content-narrow,
  89. & .layout--pass--content-narrow > * {
  90. &.text-content,
  91. & .text-content {
  92. & blockquote,
  93. & pre {
  94. width: auto;
  95. }
  96. }
  97. }
  98. }

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