layout-content-narrow.pcss.css

Same filename in other branches
  1. 9 core/themes/olivero/css/layout/layout-content-narrow.pcss.css
  2. 10 core/themes/olivero/css/layout/layout-content-narrow.pcss.css

Grid system definition for the content narrow layout.

File

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

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

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