Base

Design tokens and global styles that every other part of the theme builds on. The stylesheets follow atomic design and each level is a cascade layer: base, atoms, molecules, organisms, templates, pages. A later layer wins over an earlier one regardless of selector specificity.

Colors

Colors are Sass variables in sass/_variables.scss, exposed as CSS custom properties in sass/root.scss and as Tailwind colors in sass/tailwind.css. Use the custom properties (var(--primary)) in Sass and the tw: utilities (tw:text-primary, tw:bg-primary) in Twig.

--white
$white
#fff
tw:bg-white
--black
$black
#0f2154
tw:bg-black
--black-80
$black-80
#3f4d76
tw:bg-black-80
--black-60
$black-60
#6f7a98
tw:bg-black-60
--black-05
$black-05
#f3f4f6
tw:bg-black-05
--primary
$primary
#009cde
tw:bg-primary
--primary-10
$primary-10
#e5f5fc
tw:bg-primary-10
--primary-vivid
$primary-vivid
#30cdff
tw:bg-primary-vivid
--primary-vivid-25
$primary-vivid-25
#cbf2ff
tw:bg-primary-vivid-25
--primary-vivid-40
$primary-vivid-40
#99d7f2
tw:bg-primary-vivid-40
--primary-vivid-60
$primary-vivid-60
#66c4eb
tw:bg-primary-vivid-60
--primary-vivid-80
$primary-vivid-80
#33b0e5
tw:bg-primary-vivid-80
--primary-darker
$primary-darker
#006894
tw:bg-primary-darker
--primary-damped
$primary-damped
#bad9e5
tw:bg-primary-damped
--primary-dark
$primary-dark
#122a70
tw:bg-primary-dark
--gray-10
$gray-10
#1a1a1a
tw:bg-gray-10
--gray-20
$gray-20
#333
tw:bg-gray-20
--gray-30
$gray-30
#4d4d4d
tw:bg-gray-30
--gray-40
$gray-40
#666
tw:bg-gray-40
--gray-50
$gray-50
#808080
tw:bg-gray-50
--gray-60
$gray-60
#999
tw:bg-gray-60
--gray-70
$gray-70
#b3b3b3
tw:bg-gray-70
--gray-80
$gray-80
#ccc
tw:bg-gray-80
--gray-90
$gray-90
#e6e6e6
tw:bg-gray-90
$white: #fff;
$black: #0f2154;
$black-80: #3f4d76;
$black-60: #6f7a98;
$black-05: #f3f4f6;
$primary: #009cde;
$primary-10: #e5f5fc;
$primary-vivid: #30cdff;
$primary-vivid-25: #cbf2ff;
$primary-vivid-40: #99d7f2;
$primary-vivid-60: #66c4eb;
$primary-vivid-80: #33b0e5;
$primary-darker: #006894;
$primary-damped: #bad9e5;
$primary-dark: #122a70;
$gray-10: #1a1a1a;
$gray-20: #333;
$gray-30: #4d4d4d;
$gray-40: #666;
$gray-50: #808080;
$gray-60: #999;
$gray-70: #b3b3b3;
$gray-80: #ccc;
$gray-90: #e6e6e6;
:root {
  --white: #fff;
  --black: #0f2154;
  --black-80: #3f4d76;
  --black-60: #6f7a98;
  --black-05: #f3f4f6;
  --primary: #009cde;
  --primary-10: #e5f5fc;
  --primary-vivid: #30cdff;
  --primary-vivid-25: #cbf2ff;
  --primary-vivid-40: #99d7f2;
  --primary-vivid-60: #66c4eb;
  --primary-vivid-80: #33b0e5;
  --primary-darker: #006894;
  --primary-damped: #bad9e5;
  --primary-dark: #122a70;
  --gray-10: #1a1a1a;
  --gray-20: #333;
  --gray-30: #4d4d4d;
  --gray-40: #666;
  --gray-50: #808080;
  --gray-60: #999;
  --gray-70: #b3b3b3;
  --gray-80: #ccc;
  --gray-90: #e6e6e6;
}
@theme inline {
  --color-*: initial;
  --color-white: var(--white);
  --color-black: var(--black);
  --color-black-80: var(--black-80);
  --color-black-60: var(--black-60);
  --color-black-05: var(--black-05);
  --color-primary: var(--primary);
  --color-primary-10: var(--primary-10);
  --color-primary-vivid: var(--primary-vivid);
  --color-primary-vivid-25: var(--primary-vivid-25);
  --color-primary-vivid-40: var(--primary-vivid-40);
  --color-primary-vivid-60: var(--primary-vivid-60);
  --color-primary-vivid-80: var(--primary-vivid-80);
  --color-primary-darker: var(--primary-darker);
  --color-primary-damped: var(--primary-damped);
  --color-primary-dark: var(--primary-dark);
  --color-gray-10: var(--gray-10);
  --color-gray-20: var(--gray-20);
  --color-gray-30: var(--gray-30);
  --color-gray-40: var(--gray-40);
  --color-gray-50: var(--gray-50);
  --color-gray-60: var(--gray-60);
  --color-gray-70: var(--gray-70);
  --color-gray-80: var(--gray-80);
  --color-gray-90: var(--gray-90);
}
.example {
  color: var(--primary-dark);
  background: var(--primary-10);
}

Breakpoints

Breakpoint Min width Max width Tailwind
xs $screen-xs-min 320px $screen-xs-max 479px
sm $screen-sm-min 480px $screen-sm-max 849px tw:sm:
md $screen-md-min 850px $screen-md-max 1359px tw:md:
lg $screen-lg-min 1360px tw:lg:

The custom properties --screen-* hold the same values, but CSS does not allow custom properties in media queries, so use the Sass variables there.

Content in the main column, the sidebars and the components uses container queries (@container): it adapts to the width of its query container, not to the viewport. The query containers are body, .site-main (named main), the sidebars (named sidebar) and components that set container-type: inline-size.

Container breakpoint Min width
sm $container-sm-min 480px
md $container-md-min 640px
lg $container-lg-min 800px
$screen-xs-min: 320px;
$screen-sm-min: 480px;
$screen-md-min: 850px;
$screen-lg-min: 1360px;
$screen-xs-max: ($screen-sm-min - 1px);
$screen-sm-max: ($screen-md-min - 1px);
$screen-md-max: ($screen-lg-min - 1px);

// CONTAINER BREAKPOINTS
// For @container queries: the width of the query container (.site-main,
// sidebars, components), not the viewport.
$container-sm-min: 480px;
$container-md-min: 640px;
$container-lg-min: 800px;
@theme inline {
  --breakpoint-*: initial;
  --breakpoint-sm: 480px;
  --breakpoint-md: 850px;
  --breakpoint-lg: 1360px;
}
@use "../../variables" as *;

.example {
  font-size: 24px;

  @media (max-width: $screen-sm-max) {
    font-size: 20px;
  }
}

.example-in-content {
  @container (width >= #{$container-md-min}) {
    display: flex;
  }
}

Cascade layers

The layers go from the most general rules to the most specific ones. templates comes after the organisms: it only places the regions (.site-*, .region-*, .layout) with layout properties and never styles what is inside them, so it does not override the components. pages is last, page specific styles win over everything.

CSS outside a layer beats every layer: Drupal core and module CSS, SDC component CSS and the Tailwind utilities.

// Stylesheets follow atomic design and are loaded in this order (see
// holy.libraries.yml). Each level is a cascade layer, a later layer wins
// over an earlier one regardless of selector specificity. Selectors are
// still kept flat and low in specificity (no IDs, see stylelint.config.js).
// CSS outside a layer beats every layer: Drupal core and module CSS, SDC
// component CSS and Tailwind utilities (css/tailwind.css).
@use "sass:meta";
@layer base, atoms, molecules, organisms, templates, pages;

@layer base {
  @include meta.load-css("base/reset");
  @include meta.load-css("base/html");
  @include meta.load-css("base/body");
  @include meta.load-css("base/container");
}

Reset

The theme has its own reset, the Tailwind preflight is not loaded. All elements use border-box sizing and start without margins, paddings and borders.

/* reset */
*,
::after,
::before,
::backdrop {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

/* focus */
*:focus {
  outline: 0;
}

Root font size

The html element sets the base font (Nunito Sans) and a fluid root font size. It is 16px up to a viewport width of about 1920px, then grows with the viewport (about 21px at 2560px, 32px at 3840px), up to 64px. All sizes are converted to rem by the build, so the whole layout scales with it on large screens.

html {
  font-family: "Nunito Sans", sans-serif;
  font-size: clamp(16px, 0.833vw, 64px);
  line-height: 1.5;
}

Body

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae? Aperiam nam modi molestias placeat hic recusandae.

body {
  overflow-x: hidden;
  color: var(--black);
  font-size: 18px;
  line-height: 1.5;
  container-type: inline-size;
}

Fonts

Geologica

Geologica

The quick brown fox jumps over the lazy dog.
Sphinx of black quartz, judge my vow.

Geologica is a humanist sans-serif built from geometric, constructed letterforms. It has a wide stance, generous spacing and large apertures, so it works well for longer text. It is a variable font with four axes: Weight, Slant, Cursive and Sharpness. The Sharpness axis is a modernist take on calligraphic pen strokes and looks best in bolder weights and larger sizes.

Designers Sindre Bremnes, Frode Helland (Monokrom)
Foundry https://monokrom.no
Google Fonts https://fonts.google.com/specimen/Geologica
Source https://github.com/googlefonts/geologica
License SIL Open Font License 1.1
Axes wght 100–900, slnt -12–0, CRSV 0–1, SHRP 0–100

Weights

100 Thin The quick brown fox
200 ExtraLight The quick brown fox
300 Light The quick brown fox
400 Regular The quick brown fox
500 Medium The quick brown fox
600 SemiBold The quick brown fox
700 Bold The quick brown fox
800 ExtraBold The quick brown fox
900 Black The quick brown fox

Sizes

14px Geologica
18px Geologica
24px Geologica
36px Geologica
48px Geologica

Characters

All characters included in the font files bundled with the theme (Latin, Latin Extended, Greek and Cyrillic subsets).

Basic Latin ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
Latin-1 Supplement ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
Latin Extended-A Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Đ đ Ē ē Ĕ ĕ Ė ė Ę ę Ě ě Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĩ ĩ Ī ī Ĭ ĭ Į į İ ı IJ ij Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň Ŋ ŋ Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š š Ţ ţ Ť ť Ŧ ŧ Ũ ũ Ū ū Ŭ ŭ Ů ů Ű ű Ų ų Ŵ ŵ Ŷ ŷ Ÿ Ź ź Ż ż Ž ž
Latin Extended-B, IPA and Spacing Modifiers Ə ƒ Ơ ơ Ư ư DŽ Dž dž LJ Lj lj NJ Nj nj Ǎ ǎ Ǧ ǧ Ǫ ǫ Ǻ ǻ Ǽ ǽ Ǿ ǿ Ȁ ȁ Ȃ ȃ Ȅ ȅ Ȇ ȇ Ȉ ȉ Ȋ ȋ Ȍ ȍ Ȏ ȏ Ȑ ȑ Ȓ ȓ Ȕ ȕ Ȗ ȗ Ș ș Ț ț Ȫ ȫ Ȭ ȭ Ȱ ȱ Ȳ ȳ ȷ ə ʹ ʺ ʼ ˆ ˇ ˘ ˙ ˚ ˛ ˜ ˝
Greek ʹ ͵ ; ΄ ΅ Ά · Έ Ή Ί Ό Ύ Ώ ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ Ϗ ϗ
Cyrillic Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є ѕ і ї ј љ њ ћ ќ ѝ ў џ Ѣ ѣ Ѫ ѫ Ѳ ѳ Ѵ ѵ Ґ ґ Ғ ғ Ҕ ҕ Җ җ Ҙ ҙ Қ қ Ҝ ҝ Ҡ ҡ Ң ң Ҥ ҥ Ҫ ҫ Ү ү Ұ ұ Ҳ ҳ Ҷ ҷ Ҹ ҹ Һ һ Ӏ Ӂ ӂ Ӌ ӌ ӏ Ӑ ӑ Ӓ ӓ Ӕ ӕ Ӗ ӗ Ә ә Ӝ ӝ Ӟ ӟ Ӣ ӣ Ӥ ӥ Ӧ ӧ Ө ө Ӯ ӯ Ӱ ӱ Ӳ ӳ Ӵ ӵ Ӷ ӷ Ӹ ӹ Ԛ ԛ Ԝ ԝ
Latin Extended Additional Ẁ ẁ Ẃ ẃ Ẅ ẅ ẞ Ạ ạ Ả ả Ấ ấ Ầ ầ Ẩ ẩ Ẫ ẫ Ậ ậ Ắ ắ Ằ ằ Ẳ ẳ Ẵ ẵ Ặ ặ Ẹ ẹ Ẻ ẻ Ẽ ẽ Ế ế Ề ề Ể ể Ễ ễ Ệ ệ Ỉ ỉ Ị ị Ọ ọ Ỏ ỏ Ố ố Ồ ồ Ổ ổ Ỗ ỗ Ộ ộ Ớ ớ Ờ ờ Ở ở Ỡ ỡ Ợ ợ Ụ ụ Ủ ủ Ứ ứ Ừ ừ Ử ử Ữ ữ Ự ự Ỳ ỳ Ỵ ỵ Ỷ ỷ Ỹ ỹ
Punctuation, Currency and Symbols ‐ – — ‘ ’ ‚ “ ” „ † ‡ • … ‰ ′ ″ ‹ › ⁄ ⁒ ⁴ ₡ ₣ ₤ ₦ ₧ ₩ ₫ € ₭ ₮ ₱ ₲ ₴ ₵ ₸ ₹ ₺ ₼ ₽ № ™ ← ↑ → ↓ ↖ ↗ ↘ ↙ − ∕ ∙ ≈ ≠ ≤ ≥ ◊ ⟨ ⟩
Ligatures fi fl

Usage

h1 {
  font-family: 'Geologica', sans-serif;
  font-weight: 400;
}

Nunito Sans

Nunito Sans

The quick brown fox jumps over the lazy dog.
Sphinx of black quartz, judge my vow.

Nunito Sans is the base font of the theme, set on the html element, so all body text uses it. It is a sans-serif version of the rounded Nunito typeface, with plain terminals instead of rounded ones. It has a clean, balanced shape that reads well in running text. The theme bundles static files in eight weights, each with an italic.

Designers Vernon Adams, Jacques Le Bailly, Manvel Shmavonyan, Alexei Vanyashin
Google Fonts https://fonts.google.com/specimen/Nunito+Sans
Source https://github.com/googlefonts/NunitoSans
License SIL Open Font License 1.1
Styles wght 200–900, normal and italic

Weights

200 ExtraLight The quick brown fox
300 Light The quick brown fox
400 Regular The quick brown fox
500 Medium The quick brown fox
600 SemiBold The quick brown fox
700 Bold The quick brown fox
800 ExtraBold The quick brown fox
900 Black The quick brown fox

Italics

200 ExtraLight Italic The quick brown fox
300 Light Italic The quick brown fox
400 Italic The quick brown fox
500 Medium Italic The quick brown fox
600 SemiBold Italic The quick brown fox
700 Bold Italic The quick brown fox
800 ExtraBold Italic The quick brown fox
900 Black Italic The quick brown fox

Sizes

14px Nunito Sans
18px Nunito Sans
24px Nunito Sans
36px Nunito Sans
48px Nunito Sans

Characters

All characters included in the font files bundled with the theme (Latin, Latin Extended and Cyrillic subsets).

Basic Latin ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
Latin-1 Supplement ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
Latin Extended-A Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Đ đ Ē ē Ĕ ĕ Ė ė Ę ę Ě ě Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĩ ĩ Ī ī Ĭ ĭ Į į İ ı IJ ij Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ʼn Ŋ ŋ Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š š Ţ ţ Ť ť Ŧ ŧ Ũ ũ Ū ū Ŭ ŭ Ů ů Ű ű Ų ų Ŵ ŵ Ŷ ŷ Ÿ Ź ź Ż ż Ž ž
Latin Extended-B, IPA and Spacing Modifiers Ɓ Ɗ Ə ƒ Ơ ơ Ư ư Ƴ ƴ DŽ Dž dž LJ Lj lj NJ Nj nj Ǎ ǎ ǔ ǥ Ǧ ǧ ǩ Ǫ ǫ ǯ Ǻ ǻ Ǽ ǽ Ǿ ǿ Ȁ ȁ Ȃ ȃ Ȅ ȅ Ȇ ȇ Ȉ ȉ Ȋ ȋ Ȍ ȍ Ȏ ȏ Ȑ ȑ Ȓ ȓ Ȕ ȕ Ȗ ȗ Ș ș Ț ț ȟ Ȧ ȧ Ȩ Ȫ ȫ Ȭ ȭ Ȱ ȱ Ȳ ȳ ȷ ɓ ɗ ə ʒ ʹ ʺ ʻ ʼ ʾ ʿ ˆ ˇ ˈ ˉ ˊ ˋ ˌ ˘ ˙ ˚ ˛ ˜ ˝
Greek Δ Σ Ω μ π
Cyrillic Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є ѕ і ї ј љ њ ћ ќ ѝ ў џ Ѣ ѣ Ѫ ѫ Ѳ ѳ Ѵ ѵ Ҋ ҋ Ҍ ҍ Ҏ ҏ Ґ ґ Ғ ғ Ҕ ҕ Җ җ Ҙ ҙ Қ қ Ҝ ҝ Ҟ ҟ Ҡ ҡ Ң ң Ҥ ҥ Ҩ ҩ Ҫ ҫ Ҭ ҭ Ү ү Ұ ұ Ҳ ҳ Ҵ ҵ Ҷ ҷ Ҹ ҹ Һ һ Ҽ ҽ Ҿ ҿ Ӏ Ӂ ӂ Ӄ ӄ Ӆ ӆ Ӈ ӈ Ӊ ӊ Ӌ ӌ Ӎ ӎ ӏ Ӑ ӑ Ӓ ӓ Ӕ ӕ Ӗ ӗ Ә ә Ӛ ӛ Ӝ ӝ Ӟ ӟ Ӡ ӡ Ӣ ӣ Ӥ ӥ Ӧ ӧ Ө ө Ӫ ӫ Ӭ ӭ Ӯ ӯ Ӱ ӱ Ӳ ӳ Ӵ ӵ Ӷ ӷ Ӹ ӹ Ӻ ӻ Ӽ ӽ Ӿ ӿ Ԑ ԑ Ԓ ԓ Ԛ ԛ Ԝ ԝ Ԥ ԥ Ԧ ԧ Ԩ ԩ Ԯ ԯ
Latin Extended Additional Ḉ ḉ Ḍ ḍ Ḏ ḏ Ḕ ḕ Ḗ ḗ Ḝ ḝ Ḡ ḡ Ḥ ḥ Ḫ ḫ Ḯ ḯ Ḷ ḷ Ḻ ḻ Ṃ ṃ Ṅ ṅ Ṇ ṇ Ṉ ṉ Ṍ ṍ Ṏ ṏ Ṑ ṑ Ṓ ṓ Ṛ ṛ Ṟ ṟ Ṡ ṡ Ṣ ṣ Ṥ ṥ Ṧ ṧ Ṩ ṩ Ṭ ṭ Ṯ ṯ Ṹ ṹ Ṻ ṻ Ẁ ẁ Ẃ ẃ Ẅ ẅ Ẏ ẏ Ẓ ẓ ẗ ẞ Ạ ạ Ả ả Ấ ấ Ầ ầ Ẩ ẩ Ẫ ẫ Ậ ậ Ắ ắ Ằ ằ Ẳ ẳ Ẵ ẵ Ặ ặ Ẹ ẹ Ẻ ẻ Ẽ ẽ Ế ế Ề ề Ể ể Ễ ễ Ệ ệ Ỉ ỉ Ị ị Ọ ọ Ỏ ỏ Ố ố Ồ ồ Ổ ổ Ỗ ỗ Ộ ộ Ớ ớ Ờ ờ Ở ở Ỡ ỡ Ợ ợ Ụ ụ Ủ ủ Ứ ứ Ừ ừ Ử ử Ữ ữ Ự ự Ỳ ỳ Ỵ ỵ Ỷ ỷ Ỹ ỹ
Punctuation, Currency and Symbols ‐ ‒ – — ― ‘ ’ ‚ “ ” „ † ‡ • … ‰ ′ ″ ‹ › ⁄ ⁒ ⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₡ ₣ ₤ ₦ ₧ ₩ ₫ € ₭ ₮ ₱ ₲ ₴ ₵ ₸ ₹ ₺ ₼ ₽ ℓ № ™ Ω ℮ ∂ ∅ ∆ ∏ ∑ − ∕ ∙ √ ∞ ∫ ≈ ≠ ≤ ≥ ◊ ⟨ ⟩
Ligatures fi fl

Usage

html {
  font-family: 'Nunito Sans', sans-serif;
}

Atoms

The smallest building blocks styled by element and simple class selectors: typography, media, form elements, buttons, icons and the container. Sources are in sass/atoms/, compiled into css/atoms.css.

Titles

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6
h1 {
  margin: 0 0 60px 0;
  color: var(--primary);
  font-family: Geologica, sans-serif;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    font-size: 30px;
  }
}

h2 {
  margin: 0 0 20px 0;
  padding: 42px 0 0 0;
  color: var(--primary);
  font-family: Geologica, sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    padding: 10px 0 0 0;
    font-size: 24px;
  }
}

h3 {
  margin: 0 0 20px 0;
  padding: 42px 0 0 0;
  color: var(--primary-dark);
  font-family: Geologica, sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    margin: 0 0 10px 0;
    padding: 10px 0 0 0;
    font-size: 20px;
  }
}

h4 {
  margin: 0 0 20px 0;
  padding: 42px 0 0 0;
  color: var(--primary-dark);
  font-family: Geologica, sans-serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    margin: 0 0 10px 0;
    padding: 10px 0 0 0;
    font-size: 18px;
  }
}

h5 {
  margin: 0 0 20px 0;
  padding: 42px 0 0 0;
  color: var(--primary);
  font-family: Geologica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    margin: 0 0 10px 0;
    padding: 10px 0 0 0;
    font-size: 18px;
  }
}

h6 {
  margin: 0 0 20px 0;
  padding: 42px 0 0 0;
  color: var(--black);
  font-family: Geologica, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;

  @media (max-width: $screen-sm-max) {
    margin: 0 0 10px 0;
    padding: 10px 0 0 0;
    font-size: 16px;
  }
}

Paragraphs

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae? Aperiam nam modi molestias placeat hic recusandae.

p {
  line-height: 1.5;

  &.perex {
    color: var(--primary-dark);
    font-family: Geologica, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.6;

    @media (max-width: $screen-sm-max) {
      font-size: 20px;
      line-height: 1.5;
    }
  }
}

Perex

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae? Aperiam nam modi molestias placeat hic recusandae.

Links

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

a {
  text-decoration: underline;
  color: var(--primary);

  &:hover {
    color: var(--primary-vivid);
  }

  &:visited {
    color: var(--primary-darker);
  }
}

Lists

  • Lorem ipsum dolor sit amet
  • Consectetur adipisicing elit
    • Saepe obcaecati minima
    • Iure quaerat maiores
  • Quos officiis inventore
  1. Lorem ipsum dolor sit amet
  2. Consectetur adipisicing elit
    1. Saepe obcaecati minima
    2. Iure quaerat maiores
  3. Quos officiis inventore
ul,
ol {
  margin: 0 0 50px 0;
  padding: 2px 0 2px 15px;

  @media (max-width: $screen-sm-max) {
    margin: 0 0 18px 0;
  }
}

ul ul,
ul ol,
ol ol,
ol ul {
  margin: 0;
  padding: 0 0 0 20px;
}

ul li,
ol li {
  margin: 6px 0 6px 0;
  list-style-position: outside;
  line-height: 1.5;
}

Blockquote

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae.

blockquote {
  margin: 0 0 16px 0;
}

blockquote p {
  padding: 15px;
  background: var(--gray-40);
}

blockquote p::before {
  margin-right: 5px;
  content: "\201C";
  vertical-align: -22px;
  color: var(--gray-50);
  font-family: georgia, sans-serif;
  font-size: 54px;
  line-height: 5px;
}

blockquote p::after {
  margin-left: 5px;
  content: "\201D";
  vertical-align: -30px;
  color: var(--gray-50);
  font-family: georgia, sans-serif;
  font-size: 54px;
  line-height: 5px;
}

Horizontal rule


hr {
  clear: both;
  margin: 16px 0;
  border: 1px solid var(--primary-vivid-25);
}

Tables

Table caption
Name Type Status
Lorem ipsum Article Published
Dolor sit amet Basic page Draft
table {
  margin-top: 15px;
  margin-bottom: 15px;
  border-collapse: collapse;
  border-top: 1px solid var(--primary-vivid-25);
  border-left: 1px solid var(--primary-vivid-25);
}

caption {
  padding: 10px 15px;
  text-align: left;
  border-top: 1px solid var(--primary-vivid-25);
  border-right: 1px solid var(--primary-vivid-25);
  border-left: 1px solid var(--primary-vivid-25);
  font-weight: bold;
}

th {
  padding: 10px 15px;
  text-align: left;
  border-right: 1px solid var(--primary-vivid-25);
  border-bottom: 1px solid var(--primary-vivid-25);
  background: var(--gray-40);
  font-weight: bold;
}

td {
  padding: 10px 15px;
  border-right: 1px solid var(--primary-vivid-25);
  border-bottom: 1px solid var(--primary-vivid-25);
}

Images

Holy theme screenshot
img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

.caption {
  margin: 0 0 50px 0;

  &.align-center {
    margin-bottom: 50px;
  }

  &.align-right {
    margin: 0 0 50px 30px;
  }

  &.align-left {
    margin: 0 30px 50px 0;
  }

  & > figcaption {
    position: relative;
    z-index: 10;
    top: 12px;
    display: inline;
    max-width: none;
    padding: 4px 20px 8px 10px;
    caption-side: bottom;
    color: var(--primary-dark);
    background-color: var(--primary-damped);
    box-decoration-break: clone;
    font-size: 18px;
  }
}

Caption

Markup of an image with a caption added in CKEditor (templates/content-edit/filter-caption.html.twig). The alignment classes are align-left, align-center and align-right.

Holy theme screenshot
Lorem ipsum dolor sit amet consectetur

Audio

audio {
  background: var(--black);
}

@media (max-width: $screen-sm-max) {
  audio {
    width: 100%;
  }
}

Video

video {
  background: var(--black);
}

@media (max-width: $screen-sm-max) {
  video {
    width: 100%;
  }
}

Form elements

input,
select,
textarea {
  width: 100%;
  transition: 0.18s ease-out;
  vertical-align: bottom;
  color: var(--black);
  border: 1px solid var(--primary-damped);
  border-radius: 7px;
  background: var(--white);
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.5;
}

input,
select {
  height: 43px;
  padding: 0 13px;
}

textarea {
  padding: 13px;
}

input[type="checkbox"],
input[type="radio"],
input[type="file"] {
  width: auto;
}

input[type="reset"],
input[type="submit"] {
  width: auto;
  cursor: pointer;
  color: var(--white);
  border: 1px solid transparent;
  background: var(--primary);
  font-size: 17px;
  font-weight: 600;
}

// hover
input:hover,
select:hover,
textarea:hover {
  color: var(--black);
}

input[type="reset"]:hover,
input[type="submit"]:hover {
  color: var(--white);
  background: var(--primary-darker);
}

// focus
input:focus,
textarea:focus,
select:focus {
  color: var(--black);
}

Textarea

.form-textarea-wrapper textarea {
  display: block;
  width: 100%;
}

Buttons

Drupal adds the button class to form buttons. Buttons next to each other are separated by a horizontal margin.

.button,
.image-button {
  margin-right: 18px;
  margin-left: 18px;
}

.button:first-child,
.image-button:first-child {
  margin-right: 0;
  margin-left: 0;
}

Button as a link

button.link {
  cursor: pointer;
  background: transparent;
  font-size: inherit;
}

label button.link {
  font-weight: bold;
}

Menu

Base reset for menus rendered by templates/navigation/menu.html.twig.

ul.menu {
  margin: 0;
  padding: 0;

  li {
    margin: 0;
    list-style: none;
    line-height: 1;
  }
}

More link

.more-link {
  display: block;
  text-align: right; /* LTR */
}

[dir="rtl"] .more-link {
  text-align: left;
}

Icons

.icon-help {
  padding: 1px 0 1px 20px; /* LTR */
  background: url(../images/icons/help.png) 0 50% no-repeat; /* LTR */
}

[dir="rtl"] .icon-help {
  padding: 1px 20px 1px 0;
  background-position: 100% 50%;
}

.feed-icon {
  display: block;
  overflow: hidden;
  width: 16px;
  height: 16px;
  text-indent: -9999px;
  background: url(../images/icons/feed.svg) no-repeat;
}

Container

Centers the content of the page regions and limits its width. It is an atom, so organisms can change its padding (e.g. the footer). The padding follows the width of the query container (body).

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae?

.container {
  margin: 0 30px;

  @media (min-width: $screen-md-min) {
    margin: 0 50px;
  }

  @media (min-width: $screen-lg-min) {
    width: 70%;
    margin: 0 auto;
  }
}

Molecules

Groups of atoms rendered by Drupal core and theme templates: navigation, messages, fields and form parts. Sources are in sass/molecules/, compiled into css/molecules.css.

Breadcrumb

Breadcrumb block (templates/navigation/breadcrumb.html.twig). Items are separated by a background image, a link to the front page gets a home icon.

// Space between the main menu and the breadcrumb.
.site-breadcrumb {
  padding-top: 20px;

  @media (min-width: $screen-md-min) {
    padding-top: 30px;
  }
}

.breadcrumb ol {
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline;
  margin: 0;
  list-style-type: none;
}

// Theme breadcrumb block, overrides the base styles above. Items are
// separated by a background image instead of the core "»" separator.

.block-system-breadcrumb-block {
  & > h2 {
    display: none;
  }

  .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
  }

  .breadcrumb li {
    padding-right: 13px;
    color: var(--black);
    background: url("../images/breadcrumb-separator.svg") no-repeat right 50%;
    background-size: 6px 7px;
    font-size: 12px;

    &::before {
      content: "";
    }

    &:last-child {
      padding-right: 0;
      background: none;
      font-weight: bold;
    }
  }

  .breadcrumb a {
    color: var(--primary);

    &:hover {
      color: var(--primary-vivid);
    }
  }

  .breadcrumb a[href="/"] {
    padding-left: 20px;
    background: url("../images/breadcrumb-home.svg") no-repeat 0 50%;
    background-size: 11px 9px;
    font-weight: normal;
  }
}

Pager

Pager (templates/navigation/pager.html.twig). First, previous, next and last are arrow icons, on mobile only the current page and the arrows are shown.

.pager {
  text-align: center;
  container-type: inline-size;
}

.pager__items {
  display: inline-flex;
  clear: both;
  margin: 0;
  padding: 0;
  border: 1px solid var(--primary-damped);
  border-radius: 8px;
  line-height: 1;
}

.pager__item {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;

  &:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }

  &:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

  a {
    display: block;
    height: 44px;
    padding: 0 15px;
    text-decoration: none;
    color: var(--black);
    line-height: 44px;

    &:hover {
      color: var(--primary);
    }
  }

  &.is-active {
    background: var(--primary-damped);

    a:hover {
      color: var(--black);
    }
  }

  &.is-active:not(:has(a)) {
    height: 44px;
    padding: 0 15px;
    line-height: 44px;
  }
}

// First, previous, next and last: arrow icons instead of text.
.pager__item--first a,
.pager__item--previous a,
.pager__item--next a,
.pager__item--last a {
  width: 50px;
  height: 44px;

  span {
    display: none;
  }
}

.pager__item--first a {
  transform: rotate(180deg);
  background: url("../images/button-arrow-pager-double.svg") no-repeat 2px 50%;
  background-size: 28px 12px;

  &:hover {
    background-image: url("../images/button-arrow-pager-double-hover.svg");
  }
}

.pager__item--previous a {
  transform: rotate(180deg);
  background: url("../images/button-arrow-pager.svg") no-repeat 50% 50%;
  background-size: 24px 12px;

  &:hover {
    background-image: url("../images/button-arrow-pager-hover.svg");
  }
}

.pager__item--next a {
  background: url("../images/button-arrow-pager.svg") no-repeat 50% 50%;
  background-size: 24px 12px;

  &:hover {
    background-image: url("../images/button-arrow-pager-hover.svg");
  }
}

.pager__item--last a {
  background: url("../images/button-arrow-pager-double.svg") no-repeat 2px 50%;
  background-size: 28px 12px;

  &:hover {
    background-image: url("../images/button-arrow-pager-double-hover.svg");
  }
}

// Narrow pager: only the current page and the arrows.
@container (width < #{$container-md-min}) {
  .pager__item {
    display: none;
  }

  .pager__item.is-active,
  .pager__item--first,
  .pager__item--previous,
  .pager__item--next,
  .pager__item--last {
    display: inline;
  }
}

Tabs

Local tasks block (templates/block/block--local-tasks-block.html.twig, templates/navigation/menu-local-tasks.html.twig). Horizontal tabs from the md breakpoint, a vertical list below sm max width.

ul.tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 5px;
}

.tabs a {
  display: block;
  padding: 4px 18px;
  text-decoration: none;
}

.tabs a.is-active {
  background-color: #eee;
}

.tabs a:focus,
.tabs a:hover {
  background-color: #f5f5f5;
}
.block-local-tasks-block {
  container-type: inline-size;

  nav.tabs {
    @container (width < #{$container-md-min}) {
      ul.tabs {
        flex-direction: column;
        border-top: 1px solid var(--primary-damped);
        gap: 0;

        li {
          margin: 0 0 0 -2px;
          border-right: 1px solid var(--primary-damped);
          border-bottom: 1px solid var(--primary-damped);

          a {
            height: 50px;
            padding: 0 28px;
            white-space: nowrap;
            color: var(--black-60);
            border-left: 7px solid var(--primary-damped);
            background: none;
            font-size: 17px;
            line-height: 50px;

            &:hover {
              color: var(--black);
              border-left: 7px solid var(--primary);
            }
          }

          &.is-active a {
            color: var(--black);
            border-left: 7px solid var(--primary);
            font-weight: bold;
          }
        }
      }
    }

    @container (width >= #{$container-md-min}) {
      ul.tabs {
        flex-wrap: nowrap;
        padding: 0 25px;
        border-bottom: 2px solid var(--primary-damped);
        gap: 6px;

        li {
          margin: 0 0 -2px 0;

          a {
            height: 60px;
            padding: 0 28px;
            white-space: nowrap;
            color: var(--black-60);
            background: none;
            font-size: 17px;
            line-height: 60px;

            &:hover {
              color: var(--black);
              border-bottom: 2px solid var(--primary);
            }
          }

          &.is-active a {
            color: var(--black);
            border-bottom: 7px solid var(--primary);
            font-weight: bold;
          }
        }
      }
    }
  }
}

Action links

.action-links {
  display: flex;
  flex-wrap: wrap;
  margin: 18px 0;
  list-style: none;
  gap: 11px;
}

.button-action {
  display: inline-block;
  padding: 4px 9px 5px;
  text-decoration: none;
  line-height: 1.6;
}

.button-action::before {
  margin-left: -2px; /* LTR */
  padding-right: 4px; /* LTR */
  content: "+";
  font-weight: 900;
}

[dir="rtl"] .button-action::before {
  margin-right: -2px;
  margin-left: 0;
  padding-right: 0;
  padding-left: 4px;
}

Messages

Status messages (templates/misc/status-messages.html.twig) in three types: status, warning and error. More messages of one type are rendered as a list.

.messages {
  margin-bottom: 30px;
  padding: 15px 20px 15px 35px; /* LTR */
  border: 1px solid;
  border-width: 1px 1px 1px 0; /* LTR */
  border-radius: 2px;
  background: no-repeat 10px 17px; /* LTR */
  overflow-wrap: break-word;
}

[dir="rtl"] .messages {
  padding-right: 35px;
  padding-left: 20px;
  text-align: right;
  border-width: 1px 0 1px 1px;
  background-position: right 10px top 17px;
}

.messages + .messages {
  margin-top: 28px;
}

.messages__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 14px;
}

.messages--status {
  color: #325e1c;
  border-color: #c9e1bd #c9e1bd #c9e1bd transparent; /* LTR */
  background-color: #f3faef;
  background-image: url(../images/icons/check.svg);
  box-shadow: -8px 0 0 #77b259; /* LTR */
}

[dir="rtl"] .messages--status {
  border-color: #c9e1bd transparent #c9e1bd #c9e1bd;
  box-shadow: 8px 0 0 #77b259;
}

.messages--warning {
  color: #734c00;
  border-color: #f4daa6 #f4daa6 #f4daa6 transparent; /* LTR */
  background-color: #fdf8ed;
  background-image: url(../images/icons/warning.svg);
  box-shadow: -8px 0 0 #e09600; /* LTR */
}

[dir="rtl"] .messages--warning {
  border-color: #f4daa6 transparent #f4daa6 #f4daa6;
  box-shadow: 8px 0 0 #e09600;
}

.messages--error {
  color: #a51b00;
  border-color: #f9c9bf #f9c9bf #f9c9bf transparent; /* LTR */
  background-color: #fcf4f2;
  background-image: url(../images/icons/error.svg);
  box-shadow: -8px 0 0 #e62600; /* LTR */
}

[dir="rtl"] .messages--error {
  border-color: #f9c9bf transparent #f9c9bf #f9c9bf;
  box-shadow: 8px 0 0 #e62600;
}

.messages--error p.error {
  color: #a51b00;
}

Links

Inline list of links (templates/navigation/links.html.twig), e.g. the links under a node.

ul.inline,
ul.links.inline {
  display: inline;
  padding-left: 0; /* LTR */
}

[dir="rtl"] ul.inline,
[dir="rtl"] ul.links.inline {
  padding-left: 15px;
}

ul.inline li {
  display: inline;
  padding: 0 9px;
  list-style-type: none;
}

ul.links a.is-active {
  color: #000;
}

Item list

List rendered by templates/dataset/item-list.html.twig.

Recent content

  • Lorem ipsum dolor sit amet
  • Consectetur adipisicing elit
  • Saepe obcaecati minima
.item-list .title {
  font-weight: bold;
}

.item-list ul {
  margin: 0 0 14px 0;
  padding: 0;
}

.item-list li {
  margin: 0 0 5px 27px; /* LTR */
}

[dir="rtl"] .item-list li {
  margin: 0 27px 5px 0;
}

/**
 * Comma separated lists.
 */
.item-list--comma-list {
  display: inline;
}

.item-list--comma-list .item-list__comma-list,
.item-list__comma-list li,
[dir="rtl"] .item-list--comma-list .item-list__comma-list,
[dir="rtl"] .item-list__comma-list li {
  margin: 0;
}

Comma list

  • Drupal
  • Theme
  • Styleguide

Details

Collapsible element (templates/form/details.html.twig).

URL alias
Specify an alternative path by which this data can be accessed.
details {
  margin-top: 18px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
}

details > .details-wrapper {
  padding: 9px 27px;
}

summary {
  padding: 4px 9px;
  cursor: pointer;
}

Progress bar

Progress bar (templates/misc/progress-bar.html.twig), used by batch operations and file uploads.

Updating content
60%
Completed 3 of 5.
.progress__track {
  border-color: #b3b3b3;
  border-radius: 180px;
  background-color: #f2f1eb;
  background-image: linear-gradient(#e7e7df, #f0f0f0);
  box-shadow: inset 0 1px 3px hsl(0, 0%, 0%, 0.16);
}

.progress__bar {
  height: 16px;
  margin-top: -1px;
  margin-left: -1px; /* LTR */
  padding: 0 1px;
  -webkit-transition: width 0.5s ease-out;
  transition: width 0.5s ease-out;
  -webkit-animation: animate-stripes 3s linear infinite;
  border: 1px #07629a solid;
  border-radius: 180px;
  background: #057ec9;
  background-image: linear-gradient(to bottom, rgb(0, 0, 0, 0), rgb(0, 0, 0, 0.15)), linear-gradient(to right bottom, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%);
  background-size: 40px 40px;
}

[dir="rtl"] .progress__bar {
  margin-right: -1px;
  margin-left: 0;
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}

@media screen and (prefers-reduced-motion: reduce) {
  .progress__bar {
    -webkit-transition: none;
    transition: none;
    -webkit-animation: none;
  }
}

/**
 * Progress bar animations.
 */
@keyframes animate-stripes {
  0% {
    background-position:
      0 0,
      0 0;
  }

  100% {
    background-position:
      0 0,
      -80px 0;
  }
}

Fields

Field wrapper (templates/field/field.html.twig) with the label above or inline.

Author
Lorem Ipsum
Source
Dolor sit amet
.field {
  &.field--label-above {
    .field__label {
      display: block;
      margin-bottom: 6px;
    }
  }
}
.field__label {
  font-weight: bold;
}

.field--label-inline .field__label,
.field--label-inline .field__items {
  float: left; /* LTR */
}

.field--label-inline .field__label,
.field--label-inline > .field__item,
.field--label-inline .field__items {
  padding-right: 9px;
}

[dir="rtl"] .field--label-inline .field__label,
[dir="rtl"] .field--label-inline .field__items {
  padding-right: 0;
  padding-left: 9px;
}

.field--label-inline .field__label::after {
  content: ":";
}
.field--name-title {
  h2 {
    padding: 0;
  }
}

Tags

.field--name-field-tags {
  .field__items {
    display: inline-block;
    border: 1px solid var(--gray-40);
    border-radius: 5px;

    .field__item {
      display: inline-block;
      border-right: 1px solid var(--gray-40);
    }

    .field__item:last-child {
      border-right: 0;
    }

    .field__item a {
      display: inline-block;
      padding: 10px;
    }
  }
}

Image

Holy theme screenshot
.field--type-image {
  img {
    max-width: 100%;
    height: auto;
  }
}

Formatted text

Text fields (templates/field/field--text.html.twig) get the text-formatted class, the paragraphs in them are spaced with a gap.

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae?

Aperiam nam modi molestias placeat hic recusandae. Saepe obcaecati minima iure quaerat maiores.

.text-formatted {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

Files

File links (templates/field/file-link.html.twig) get an icon by the MIME type of the file.

/* File icons. */

.file {
  display: inline-block;
  min-height: 16px;
  padding-left: 20px; /* LTR */
  background-repeat: no-repeat;
  background-position: left center; /* LTR */
}

[dir="rtl"] .file {
  padding-right: 20px;
  padding-left: inherit;
  background-position: right center;
}

.file--general,
.file--application-octet-stream {
  background-image: url(../images/icons/application-octet-stream.svg);
}

.file--package-x-generic {
  background-image: url(../images/icons/package-x-generic.svg);
}

.file--x-office-spreadsheet {
  background-image: url(../images/icons/x-office-spreadsheet.svg);
}

.file--x-office-document {
  background-image: url(../images/icons/x-office-document.svg);
}

.file--x-office-presentation {
  background-image: url(../images/icons/x-office-presentation.svg);
}

.file--text-x-script {
  background-image: url(../images/icons/text-x-script.svg);
}

.file--text-html {
  background-image: url(../images/icons/text-html.svg);
}

.file--text-plain {
  background-image: url(../images/icons/text-plain.svg);
}

.file--application-pdf {
  background-image: url(../images/icons/application-pdf.svg);
}

.file--application-x-executable {
  background-image: url(../images/icons/application-x-executable.svg);
}

.file--audio {
  background-image: url(../images/icons/audio-x-generic.svg);
}

.file--video {
  background-image: url(../images/icons/video-x-generic.svg);
}

.file--text {
  background-image: url(../images/icons/text-x-generic.svg);
}

.file--image {
  background-image: url(../images/icons/image-x-generic.svg);
}

Form items

Form item wrapper (templates/form/form-element.html.twig) with a label, a description, a required mark and an inline error message.

The title is shown in lists and in the browser tab.
The email address lorem@ is not valid.
Notifications
Sent once a day.
// form-item
.form-item {
  margin-bottom: 30px;

  label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 0 10px;
    color: var(--primary);
    font-size: 14px;
    font-weight: normal;
  }

  .description {
    padding: 8px 10px 0 10px;
    color: var(--black-60);
    font-size: 13px;
    line-height: 1.5;
  }

  .form-type-checkbox,
  .form-type-radio {
    margin: 8px 0;

    label {
      margin-bottom: 0;
      color: var(--primary);
      font-weight: normal;
    }
  }
}

// form-actions
.form-actions {
  margin-bottom: 30px;
}
form .field-multiple-table {
  margin: 0;
}

form .field-multiple-table .field-multiple-drag {
  width: 30px;
  padding-right: 0; /* LTR */
}

[dir="rtl"] form .field-multiple-table .field-multiple-drag {
  padding-left: 0;
}

form .field-multiple-table .field-multiple-drag .tabledrag-handle {
  padding-inline-end: 9px;
}

form .field-add-more-submit {
  margin: 9px 0 0;
}

/**
 * Markup generated by Form API.
 */
.form-item,
.form-actions {
  margin-top: 18px;
  margin-bottom: 18px;
}

tr.odd .form-item,
tr.even .form-item {
  margin-top: 0;
  margin-bottom: 0;
}

.form-composite > .fieldset-wrapper > .description,
.form-item .description {
  font-size: 15px;
}

label.option {
  display: inline;
  font-weight: normal;
}

.form-composite > legend,
.label {
  display: inline;
  font-size: inherit;
  font-weight: bold;
}

.form-checkboxes .form-item,
.form-radios .form-item {
  margin-top: 7px;
  margin-bottom: 7px;
}

.form-type-radio .description,
.form-type-checkbox .description {
  margin-left: 43px; /* LTR */
}

[dir="rtl"] .form-type-radio .description,
[dir="rtl"] .form-type-checkbox .description {
  margin-right: 43px;
  margin-left: 0;
}

.marker {
  color: #e00;
}

.form-required::after {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px;
  content: "";
  vertical-align: super;

  /* Use a background image to prevent screen readers from announcing the text. */
  background-image: url(../images/icons/required.svg);
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.form-item input.error,
.form-item textarea.error,
.form-item select.error {
  border: 2px solid red;
}

/* Inline error messages. */
.form-item--error-message::before {
  display: inline-block;
  width: 14px;
  height: 14px;
  content: "";
  vertical-align: sub;
  background: url(../images/icons/error.svg) no-repeat;
  background-size: contain;
}

Inline form

Form items next to each other, e.g. exposed Views filters (form--inline).

.form--inline .form-item {
  float: left; /* LTR */
  margin-right: 9px; /* LTR */
}

[dir="rtl"] .form--inline .form-item {
  float: right;
  margin-right: 0;
  margin-left: 9px;
}

/* This is required to win over specificity of [dir="rtl"] .form--inline .form-item */
[dir="rtl"] .views-filterable-options-controls .form-item {
  margin-right: 2%;
}

.form--inline .form-item-separator {
  margin-top: 41px;
  margin-right: 18px; /* LTR */
  margin-left: 9px; /* LTR */
}

[dir="rtl"] .form--inline .form-item-separator {
  margin-right: 9px;
  margin-left: 18px;
}

.form--inline .form-actions {
  clear: left; /* LTR */
}

[dir="rtl"] .form--inline .form-actions {
  clear: right;
}

Container inline

Label and element on one line (container-inline), the label gets a colon.

.container-inline label::after,
.container-inline .label::after {
  content: ":";
}

.form-type-radios .container-inline label::after,
.form-type-checkboxes .container-inline label::after {
  content: "";
}

.form-type-radios .container-inline .form-type-radio,
.form-type-checkboxes .container-inline .form-type-checkbox {
  margin: 0 18px;
}

.container-inline .form-actions,
.container-inline.form-actions {
  margin-top: 0;
  margin-bottom: 0;
}

Password

Password strength indicator and suggestions, the markup is added by core user.js. Strength states: is-weak, is-fair, is-good, is-strong.

Password strength: Fair
Recommendations to make your password stronger:
  • Add uppercase letters
  • Add punctuation
/* Visual styling for the Password strength indicator */
.password-strength__meter {
  margin-top: 9px;
  background-color: #ebeae4;
}

.password-strength__indicator {
  -webkit-transition: width 0.5s ease-out;
  transition: width 0.5s ease-out;
  background-color: #77b259;
}

.password-strength__indicator.is-weak {
  background-color: #e62600;
}

.password-strength__indicator.is-fair {
  background-color: #e09600;
}

.password-strength__indicator.is-good {
  background-color: #0074bd;
}

.password-strength__indicator.is-strong {
  background-color: #77b259;
}

.password-confirm,
.password-field,
.password-strength,
.password-confirm-match,
.password-confirm-message {
  width: 55%;
}

.password-suggestions {
  max-width: 625px;
  margin: 13px 0;
  padding: 4px 9px;
  border: 1px solid #b4b4b4;
}

.password-suggestions ul {
  margin-bottom: 0;
}

.confirm-parent,
.password-parent {
  clear: left; /* LTR */
  overflow: hidden;
  max-width: 594px;
  margin: 0;
}

[dir="rtl"] .confirm-parent,
[dir="rtl"] .password-parent {
  clear: right;
}

/* Styling for the status indicator of the passwords match test.  */
.password-confirm .ok {
  color: #325e1c;
  font-weight: bold;
}

.password-confirm .error {
  color: #a51b00;
  font-weight: bold;
}

Image widget

Uploaded image in the node form: a thumbnail on the left, alternative text and the remove button on the right.

screenshot.png (17.5 KB)
.image-preview {
  float: left; /* LTR */
  padding: 0 10px 10px 0; /* LTR */
}

[dir="rtl"] .image-preview {
  float: right;
  padding: 0 0 10px 10px;
}

.image-widget-data {
  float: left; /* LTR */
}

[dir="rtl"] .image-widget-data {
  float: right;
}

.image-widget-data .text-field {
  width: auto;
}

Table states

States added by core table behaviors: a checkbox column and a selected row (tableselect), the sorted column (tablesort) and a moved row (tabledrag).

Title Updated
Lorem ipsum (selected) 17. 10. 2026
Dolor sit amet (dragged) 16. 10. 2026
Consectetur (previously dragged) 15. 10. 2026
tr.selected td {
  background: #ffc;
}

td.checkbox,
th.checkbox {
  text-align: center;
}

[dir="rtl"] td.checkbox,
[dir="rtl"] th.checkbox {
  /* This is required to win over specificity of [dir="rtl"] td */
  text-align: center;
}
th.is-active img {
  display: inline;
}

td.is-active {
  background-color: #ddd;
}
tr.drag {
  background-color: #fffff0;
}

tr.drag-previous {
  background-color: #ffd;
}

body div.tabledrag-changed-warning {
  margin-bottom: 9px;
}

Dropbutton

Theme overrides of the core dropbutton. The layout and the toggle come from the core dropbutton library, which the styleguide does not load, so this is a code reference only.

<div class="dropbutton-wrapper dropbutton-multiple">
  <div class="dropbutton-widget">
    <ul class="dropbutton dropbutton--multiple">
      <li class="dropbutton-action"><a href="#">Edit</a></li>
      <li class="dropbutton-action secondary-action"><a href="#">Delete</a></li>
    </ul>
  </div>
</div>
.js .dropbutton-widget {
  border: 1px solid #ccc;
  background-color: white;
}

.js .dropbutton-widget:hover {
  border-color: #b8b8b8;
}

.dropbutton .dropbutton-action > * {
  padding: 2px 9px;
  white-space: nowrap;
}

.dropbutton .secondary-action {
  border-top: 1px solid #e8e8e8;
}

.dropbutton-multiple .dropbutton {
  border-right: 1px solid #e8e8e8; /* LTR */
}

[dir="rtl"] .dropbutton-multiple .dropbutton {
  border-right: 0 none;
  border-left: 1px solid #e8e8e8;
}

.dropbutton-multiple .dropbutton .dropbutton-action > * {
  margin-inline-end: 5px;
}

Organisms

Page parts built from molecules and atoms: header, navigation, content, comments, sidebar and footer. Sources are in sass/organisms/, compiled into css/organisms.css. The page layout is templates/layout/page.html.twig.

Media queries respond to the browser window, not to the preview width. Resize the window to see the mobile layout (below 850px).

Header

Header with the branding block, the header menu (account menu) and the search form. Below 850px the branding is hidden (the navbar shows it) and the header becomes part of the collapsible mobile menu.

.site-header {
  @media (max-width: $screen-sm-max) {
    margin-top: auto;

    .site-header-wrapper {
      display: flex;
      flex-direction: column;

      .region-header {
        display: none;
      }

      .region-header-search {
        order: 1;
      }

      .region-header-menu {
        order: 2;
        margin-bottom: 50px;
      }
    }
  }

  @media (min-width: $screen-md-min) {
    .site-header-wrapper {
      position: relative;
    }

    .region-header {
      display: flex;
    }
  }
}
.site-header {
  .block-system-branding-block {
    @media (max-width: $screen-sm-max) {
      display: none;
    }

    @media (min-width: $screen-md-min) {
      margin: 0 auto 0 0;

      a.logo {
        display: flex;
        padding: 38px 0 38px 0;
        text-decoration: none;
        gap: 18px;

        .image {
          display: block;

          img {
            width: auto;
            height: 74px;
          }
        }

        .title {
          display: flex;
          flex-direction: column;
          justify-content: center;

          .site-name {
            display: block;
            color: var(--primary-dark);
            font-family: Geologica, sans-serif;
            font-size: 30px;
            font-weight: 600;
          }

          .site-slogan {
            position: relative;
            top: -5px;
            display: block;
            color: var(--primary-dark);
            font-family: Geologica, sans-serif;
            font-size: 15px;
            font-weight: 100;
          }
        }
      }
    }
  }
}
// Menus in the header menu region (user account menu).

.region-header-menu {
  .block-menu > h2 {
    display: none;
  }

  .block-menu ul.menu {
    display: flex;
    gap: 25px;

    @media (max-width: $screen-sm-max) {
      justify-content: flex-end;
    }
  }

  // Second level is not shown.
  .block-menu li li {
    display: none;
  }

  @media (min-width: $screen-md-min) {
    position: absolute;
    top: 20px;
    right: 0;
    display: flex;
    gap: 30px;
  }
}

.region-header-menu .block-menu a {
  display: block;
  padding: 5px 0;
  color: var(--black);
  font-size: 14px;
  font-weight: 600;

  &[data-drupal-link-system-path="user"] {
    padding-left: 26px;
    background: url("../images/user.svg") no-repeat 0 50%;
    background-size: auto 18px;

    @media (max-width: $screen-sm-max) {
      padding-left: 37px;
      background-size: auto 30px;
    }
  }

  &[data-drupal-link-system-path="user/logout"],
  &[data-drupal-link-system-path="user/login"] {
    padding-left: 23px;
    background: url("../images/logout.svg") no-repeat 0 50%;
    background-size: auto 18px;

    @media (max-width: $screen-sm-max) {
      padding-left: 35px;
      background: url("../images/mobile-logout.svg") no-repeat 0 50%;
      background-size: auto 30px;
    }
  }

  &[data-drupal-link-system-path="user/login"].is-active {
    color: var(--primary);
  }

  @media (max-width: $screen-sm-max) {
    text-decoration: none;
    font-size: 18px;
    line-height: 30px;
  }
}

.region-header-menu .block-menu .menu-item--active-trail a {
  font-weight: bold;
}
.site-header {
  .region-header-search {
    .block-search {
      & > h2 {
        display: none;
      }

      // base
      form,
      div,
      input,
      span {
        margin: 0;
        padding: 0;
      }

      form {
        display: flex;
      }

      .form-submit {
        width: 142px;
        padding-right: 30px;
        padding-left: 53px;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        background-image: url("../images/search.svg");
        background-repeat: no-repeat;
        background-position: 24px 50%;
        background-size: 18px 18px;

        &:hover {
          color: var(--black);
          border-color: var(--primary);
          background-color: var(--primary-vivid);
          background-image: url("../images/search-hover.svg");
        }
      }

      .form-search {
        padding-right: 15px;
        padding-left: 15px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;

        @media (min-width: $screen-md-min) {
          width: 220px;
        }
      }
    }

    @media (max-width: $screen-sm-max) {
      margin-bottom: 25px;

      .form-item {
        width: 100%;

        .form-search {
          height: 55px;
          color: var(--primary-darker);
          border-width: 1.5px;
          border-color: var(--primary-darker);
          background: transparent;
        }
      }

      .form-actions {
        .form-submit {
          overflow: hidden;
          width: 78px;
          height: 55px;
          padding-right: 0;
          padding-left: 0;
          text-indent: 300px;
          border-width: 1.5px;
          border-color: var(--primary-darker);
          background-color: var(--primary-darker);
          background-position: 50% 50%;
          background-size: 18px 18px;

          &:hover {
            border-width: 1.5px;
            border-color: var(--primary-darker);
            background-color: var(--primary-darker);
            background-image: url("../images/search.svg");
          }
        }
      }
    }

    @media (min-width: $screen-md-min) {
      position: absolute;
      right: 0;
      bottom: 35px;
      display: flex;
    }
  }
}

Language switcher

Block holy_languageswitcher in the header menu region, shown on multilingual sites. Links show the language code; screen readers get the language name in the language itself (preprocess_links__language_block in src/Hook/ThemeHooks.php).

// Language switcher (block holy_languageswitcher in the header menu region).
// Links show the language code, the active language is highlighted.

.site-header .block-language {
  h2 {
    display: none;
  }

  ul.links {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 4px;
  }

  li {
    margin: 0;
    padding: 0;
  }

  a {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    color: var(--black);
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    &:hover,
    &:focus-visible {
      color: var(--primary-darker);
      border-color: var(--primary-damped);
    }

    &.is-active {
      color: var(--white);
      border-color: var(--primary-darker);
      background: var(--primary-darker);
    }
  }
}

Navbar

Mobile bar with the branding and the menu button, shown only below 850px. The button toggles the menu-open class on body.

.site-navbar-wrapper {
  @media (max-width: $screen-sm-max) {
    position: relative;
    height: 90px;

    .site-navbar {
      position: relative;
      z-index: 100;
      height: 90px;
      background: var(--white);
      box-shadow: 0 1px 2px rgb(0, 0, 0, 0.3);
    }
  }

  @media (min-width: $screen-md-min) {
    display: none;
  }
}

// open
body.menu-open {
  .site-navbar-wrapper {
    .site-navbar {
      position: fixed;
      top: 0;
      width: 100%;
      height: 90px;
    }
  }
}
.site-navbar .block-system-branding-block {
  float: left;
  height: 90px;
}

.site-navbar a.logo {
  display: flex;
  align-items: center;
  height: 90px;
  padding: 0 20px;
  text-decoration: none;
  gap: 13px;

  .image {
    display: block;
  }

  img {
    width: auto;
    height: 61px;
  }

  .title {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .site-name {
    display: block;
    color: var(--primary-dark);
    font-family: Geologica, sans-serif;
    font-size: 28px;
    font-weight: 600;
  }

  .site-slogan {
    position: relative;
    top: -5px;
    display: block;
    color: var(--primary-dark);
    font-family: Geologica, sans-serif;
    font-size: 15px;
    font-weight: 100;
  }
}
.site-navbar {
  .icon-menu {
    position: absolute;
    z-index: 200;
    top: 0;
    right: 0;
    width: 80px;
    height: 90px;
    cursor: pointer;
    text-align: center;
    border: 0;
    background: none;

    span.icon-menu-1,
    span.icon-menu-2,
    span.icon-menu-3 {
      position: relative;
      top: 0;
      display: block;
      width: 30px;
      height: 3px;
      margin: 7px auto;
      background: var(--black);
    }

    span.icon-menu-1,
    span.icon-menu-3 {
      transition: all 0.1s 0.1s;
    }

    span.icon-menu-2 {
      transition: all 0.1s 0.1s;
    }

    @media (min-width: $screen-md-min) {
      display: none;
    }
  }
}

/* open */
body.menu-open {
  .site-navbar {
    .icon-menu {
      span.icon-menu-1 {
        position: relative;
        top: 10px;
        transform: rotate(45deg);
      }

      span.icon-menu-2 {
        visibility: hidden;
        transition: all 0.1s 0s;
      }

      span.icon-menu-3 {
        position: relative;
        top: -10px;
        transform: rotate(-45deg);
      }

      span.icon-menu-1,
      span.icon-menu-3 {
        transition: all 0 0;
      }
    }
  }
}

Navbar collapse

Below 850px the header and the main menu are hidden in .site-navbar-collapse. The menu button opens it as a full screen panel under the navbar (body.menu-open), with the menu above the header.

<div id="navbar-collapse" class="site-navbar-collapse">
  <header id="header" class="site-header" role="banner">
    <div class="container">
      <div id="header-wrapper" class="site-header-wrapper">
        <!-- header, header_menu and header_search regions -->
      </div>
    </div>
  </header>
  <div id="menu" class="site-menu main-navigation">
    <div class="container">
      <!-- menu region -->
    </div>
  </div>
</div>
@media (max-width: $screen-sm-max) {
  .site-navbar-collapse {
    display: none;

    .container {
      padding: 0 50px;
    }
  }

  body.menu-open {
    overflow: hidden;

    .site-navbar-collapse {
      position: fixed;
      z-index: 1000;
      top: 90px;
      left: 0;
      display: flex;
      overflow-y: auto;
      flex-direction: column;
      width: 100%;
      height: calc(100% - 90px);
      padding-top: 50px;
      color: var(--white);
      background: var(--primary);

      .site-header {
        order: 2;
      }

      .site-menu {
        order: 1;
      }
    }
  }
}

Main menu region

Wrapper of the menu region with a gradient background. The menu itself is the main_menu component (templates/navigation/menu--main--menu.html.twig).

<div id="menu" class="site-menu main-navigation">
  <div class="container">
    <div class="region region-menu">
      <!-- main_menu component -->
    </div>
  </div>
</div>
.site-menu {
  .block-menu > h2 {
    display: none;
  }

  @media (max-width: $screen-sm-max) {
    color: var(--white);

    .region-menu {
      margin-bottom: 50px;
    }
  }

  @media (min-width: $screen-md-min) {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-vivid));
  }
}

Page title

Lorem ipsum dolor sit amet

.site-main {
  .block-page-title-block {
    h1 {
      margin: 0 0 40px 0;
      color: var(--primary);

      @media (max-width: $screen-sm-max) {
        margin: 0 0 20px 0;
      }
    }
  }
}

Blocks

Block wrapper (templates/block/block.html.twig). The main content block stacks its children with a 60px gap.

Lorem ipsum dolor sit amet consectetur adipisicing elit.

Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae.

.block {
  & > h2 {
    padding: 0;
  }
}
.block-system-main-block {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

About Holy block

Block holy_about on the front page in the secondary sidebar: a short description of the theme with links related to the project. The text is the header of the view holy_about, editable in Views.

// "About Holy" block (holy_about): a short description of the theme with
// links, shown on the front page in the secondary sidebar.
.block-views-blockholy-about-block-1 {
  padding: 30px;
  color: var(--black-80);
  border-radius: 8px;
  background: var(--primary-10);
  font-size: 15px;
  line-height: 1.5;

  & > h2 {
    margin: 0 0 15px 0;
    color: var(--black);
    font-size: 20px;
    font-weight: 700;
  }

  p {
    margin: 0 0 20px 0;
  }

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li {
    margin: 0;
    border-top: 1px solid var(--primary-damped);
  }

  a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: var(--primary-darker);
    font-weight: 600;

    &:hover,
    &:focus-visible {
      text-decoration: underline;
    }
  }
}

Sidebar

Section navigation in the first sidebar: block holy_sidebar_menu shows the main menu from the second level. The heading is the first-level item of the current section, linked to the section page. The current page and its parents are highlighted, nested levels are indented. On a page without a submenu the block and the sidebar are not rendered.

.sidebar {
  margin: 0 0 40px 0;
  color: var(--primary-vivid-25);

  .region {
    display: flex;
    flex-direction: column;
    gap: 60px;
  }

  .block {
    & > h2 {
      margin: 0 0 30px 0;
      padding: 15px 15px 0 0;
      color: var(--black);
      font-size: 18px;
      font-weight: 700;
    }
  }
}
// Section navigation: a menu block in a sidebar, e.g. the main menu from the
// second level (block holy_sidebar_menu). The heading links to the section.
.sidebar .block-menu {
  & > h2 a {
    text-decoration: none;
    color: inherit;

    &:hover,
    &:focus-visible {
      text-decoration: underline;
      color: var(--primary-darker);
    }
  }

  ul.menu {
    border-top: 1px solid var(--primary-damped);
  }

  li {
    line-height: 1.2;
  }

  a:not(h2 a) {
    display: block;
    padding: 14px 10px 12px 10px;
    text-decoration: none;
    color: var(--black-80);
    border-bottom: 1px solid var(--primary-damped);
    background: var(--white);
    font-size: 14px;
    font-weight: 700;

    &:hover,
    &:focus-visible {
      background: var(--primary-vivid-25);
    }

    &.is-active {
      color: var(--black);
      background: var(--primary-vivid-25);
      box-shadow: inset 4px 0 0 var(--primary);
    }
  }

  // Parents of the current page.
  .menu-item--active-trail > a {
    color: var(--black);
  }

  // Nested levels are indented and lighter.
  ul.menu ul.menu {
    border-top: 0;

    a {
      padding-left: 30px;
      font-weight: 400;
    }
  }

  ul.menu ul.menu ul.menu a {
    padding-left: 50px;
  }
}

Node

Full view of a node (templates/content/node--full.html.twig) with the date and author, a perex from the summary and the node links (templates/content/links--node.html.twig).

Holy theme screenshot
Lorem Ipsum

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem.

Lorem ipsum dolor sit amet consectetur adipisicing elit. Saepe obcaecati minima iure quaerat maiores, quos officiis inventore nam laborum dolorem deserunt laboriosam.

.node--unpublished {
  background-color: #fff4f4;
}

.node {
  .node-info {
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
    gap: 20px;

    .date {
      color: var(--primary-vivid-60);
      font-size: 14px;
      font-weight: 800;
    }

    .author {
      display: flex;
      align-items: center;
      margin-right: auto;
      padding: 0 5px;
      color: var(--black-80);
      border-radius: 3px;
      background-color: var(--primary-vivid-40);
      font-size: 14px;
      font-weight: 800;
      line-height: 18px;
    }

    .comment {
      color: var(--primary-darker);
      font-size: 14px;
    }
  }
}

// Links.
.node__links {
  margin-bottom: 20px;
  padding-top: 40px;
  text-align: right;
  font-size: 14px;
}

.node__links ul.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  gap: 20px;

  li {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  a {
    font-weight: bold;

    &:hover {
      color: var(--primary);
    }
  }
}

Article teaser

Teaser (templates/content/node--teaser.html.twig), the image and the text side by side from 850px.

Holy theme screenshot

Lorem ipsum dolor sit amet

Lorem Ipsum

Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae.

.node--type-article.node--view-mode-teaser {
  // Image.
  .field--type-image {
    @container (width >= #{$container-md-min}) {
      flex: 1;
      margin-top: 10px;
    }
  }

  .field--type-image a {
    display: block;
    overflow: hidden;
  }

  .field--type-image img {
    width: 100%;
    max-width: none;
    height: auto;
    transition: 0.3s ease-in;
  }

  .field--type-image:hover img {
    transform: scale(1.15);
  }

  // Text: title and read more link.
  .text {
    @container (width >= #{$container-md-min}) {
      flex: 1.8;
    }
  }

  .text h2.title {
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.3;

    a {
      transition: color 0.25s;
      text-decoration: none;
      color: var(--black);
      font-size: 34px;
      font-weight: 600;

      &:hover {
        transition: color 0.25s;
        color: var(--primary);
      }
    }
  }

  .readmore {
    margin-top: -5px;

    a {
      display: flex;
      align-items: center;
      color: var(--primary-vivid-80);
      font-size: 14px;
      font-weight: 700;
      gap: 10px;

      &::after {
        display: inline-block;
        width: 26px;
        height: 20px;
        content: "";
        transition: width 0.25s;
        background: url("../images/button-read-more.svg") no-repeat right 50%;
        background-size: auto 10px;
      }

      &:hover {
        text-decoration: none;
      }

      &:hover::after {
        width: 31px;
        transition: width 0.25s;
      }
    }
  }

  @container (width >= #{$container-md-min}) {
    display: flex;
    gap: 40px;
  }
}

Comments

Comment (templates/content/comment.html.twig) with an avatar (user picture or the first letter of the name), meta, content and links. Replies are indented.

Comments

// The comments section is the query container for the comments in it.
.field--type-comment {
  container-type: inline-size;
}

.field--type-comment > h2 {
  margin-bottom: 50px;
}

article.comment {
  margin-bottom: 30px;

  @container (width >= #{$container-md-min}) {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 40px;
  }
}

// Avatar: user picture or the first letter of the author name.
.comment__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin-bottom: 10px;
  color: var(--primary-darker);
  border-radius: 100%;
  background-color: var(--primary-damped);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.5;

  img {
    border-radius: 100%;
  }

  @container (width >= #{$container-md-min}) {
    margin-bottom: 0;
  }
}

// Meta: author, date, permalink.
.comment__meta {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 8px;
  gap: 14px;

  mark {
    padding: 0 5px;
    color: var(--black);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 800;
    line-height: 18px;
  }

  @container (width >= #{$container-md-min}) {
    padding: 0 20px;
  }
}

.comment__info {
  display: flex;
  align-items: center;
  margin-right: auto;
  line-height: 1.5;
  gap: 15px;
}

.comment__author {
  color: var(--primary-darker);
  font-size: 16px;
  font-weight: 800;
}

.comment__date {
  color: var(--black-60);
  font-size: 14px;
  font-weight: 600;
}

.comment__permalink {
  display: flex;
  align-items: center;

  a {
    font-size: 12px;
    font-weight: bold;
  }

  @container (width < #{$container-sm-min}) {
    display: none;
  }
}

// Content: title, body, links.
.comment__content {
  padding: 15px 20px 20px 20px;
  border-radius: 8px;
  background-color: var(--black-05);

  .field--name-comment-body {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;

    p {
      margin-bottom: 5px;
    }
  }
}

.comment__title {
  margin-bottom: 10px;
  padding: 0;
  color: var(--black);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;

  a {
    text-decoration: none;
    color: var(--black);

    &:hover {
      color: var(--primary);
    }
  }
}

.comment__content ul.links {
  display: flex;
  flex-direction: row-reverse;
  margin: 0;
  padding: 10px 0 0 0;
  border-top: 1px solid var(--primary-damped);

  li {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;

    &:last-child {
      margin-right: auto;
    }
  }

  a {
    font-size: 14px;
    font-weight: 600;

    &:hover {
      color: var(--primary);
    }
  }

  a[href*="reply"],
  a[href*="edit"],
  a[href*="delete"] {
    display: inline-block;
    margin-right: 15px;
    padding-left: 40px;
    text-decoration: none;
    color: var(--black-80);
    background-size: auto 26px;
    line-height: 26px;

    &:hover {
      color: var(--primary);
    }
  }

  a[href*="reply"] {
    background: url("../images/ico-comments-reply.svg") no-repeat 7px 50%;
  }

  a[href*="edit"] {
    background: url("../images/ico-comments-edit.svg") no-repeat 7px 50%;
  }

  a[href*="delete"] {
    background: url("../images/ico-comments-delete.svg") no-repeat 7px 50%;
  }
}

// Threaded replies.
.indented {
  @container (width >= #{$container-md-min}) {
    margin-left: 110px;

    article.comment {
      grid-template-columns: 50px 1fr;
      gap: 30px;
    }

    .comment__avatar {
      width: 50px;
      height: 50px;
    }

    .indented {
      margin-left: 80px;
    }
  }
}
/**
 * Indent threaded comments.
 */
.indented {
  margin-left: 25px; /* LTR */
}

[dir="rtl"] .indented {
  margin-right: 25px;
  margin-left: 0;
}

View

Views wrapper (templates/views/views-view.html.twig): rows with a bottom margin, a full width table and a more link.

Lorem ipsum dolor sit amet consectetur adipisicing elit.
Eos velit eveniet a voluptatem ad perspiciatis.
.view {
  .view-content {
    // table
    .views-table {
      width: 100%;
    }

    // row
    .views-row {
      margin-bottom: 60px;
    }
  }

  .more-link {
    margin-top: 10px;
    padding-top: 15px;
    text-align: left;
    border-top: 1px solid #eee;
  }
}

Exposed filters

Filter form of administration lists (exposed-filters).

.exposed-filters .filters {
  float: left; /* LTR */
  margin-right: 18px; /* LTR */
}

[dir="rtl"] .exposed-filters .filters {
  float: right;
  margin-right: 0;
  margin-left: 18px;
}

.exposed-filters .form-item {
  margin: 0 0 2px 0;
}

.exposed-filters .form-item label {
  float: left; /* LTR */
  width: 180px;
  font-weight: normal;
}

[dir="rtl"] .exposed-filters .form-item label {
  float: right;
}

.exposed-filters .form-select {
  width: 252px;
}

/* Current filters */
.exposed-filters .current-filters {
  margin-bottom: 18px;
}

.exposed-filters .current-filters .placeholder {
  font-weight: bold;
  font-style: normal;
}

.exposed-filters .additional-filters {
  float: left; /* LTR */
  margin-right: 18px; /* LTR */
}

[dir="rtl"] .exposed-filters .additional-filters {
  float: right;
  margin-right: 0;
  margin-left: 18px;
}

Search results

  1. Lorem ipsum dolor sit amet

    Lorem ipsum dolor sit amet consectetur adipisicing elit.

    Sat, 17 Oct 2026 - 09:00
    Lorem Ipsum
    2 comments
.search-results {
  list-style: none;
}

Footer

Footer region with the branding, menus and text blocks. Two columns from 320px, one row from 850px.

.site-footer {
  padding: 40px 0 0 0;
  color: var(--white);
  background: linear-gradient(0deg, var(--primary-dark), var(--black));

  @media (min-width: $screen-xs-min) {
    .container {
      padding: 0 40px;
    }

    .region-footer {
      display: grid;
      grid-template-columns: repeat(2, 1fr);

      .block-system-branding-block {
        grid-column: 1 / span 2;
      }
    }
  }

  @media (min-width: $screen-md-min) {
    padding: 80px 0 0 0;

    .container {
      padding: 0 50px;
    }

    .region-footer {
      display: flex;
      gap: 40px;
    }
  }

  @media (min-width: $screen-lg-min) {
    .container {
      padding: 0;
    }
  }
}
.site-footer .block-system-branding-block {
  margin-bottom: 40px;
}

.site-footer a.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 13px;

  .image {
    display: block;
  }

  img {
    width: auto;
    height: 56px;
  }

  .title {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .site-name {
    display: block;
    color: var(--white);
    font-family: Geologica, sans-serif;
    font-size: 24px;
    font-weight: 600;
  }

  .site-slogan {
    position: relative;
    top: -5px;
    display: block;
    color: var(--white);
    font-family: Geologica, sans-serif;
    font-size: 15px;
    font-weight: 100;
  }
}
.site-footer .block-menu {
  padding-bottom: 40px;
}

.site-footer ul.menu a {
  display: block;
  padding: 9px 0 9px 0;
  text-decoration: none;
  color: var(--white);

  &:hover {
    color: var(--primary-vivid-25);
  }

  @media (max-width: $screen-sm-max) {
    padding: 8px 0;
    text-decoration: underline;
    font-size: 18px;
  }
}
.site-footer {
  .block {
    & > h2 {
      display: none;
    }

    .field {
      p {
        line-height: 1.6;
      }

      a {
        color: #fff;

        &:hover {
          color: var(--primary);
        }
      }
    }
  }

  @media (min-width: $screen-md-min) {
    .block {
      flex: 1;
    }
  }
}

Copyright

Bottom bar with blocks separated by a vertical line from 850px.

.site-copyright {
  text-align: center;
  color: var(--white);
  background: var(--primary-dark);

  @media (max-width: $screen-sm-max) {
    padding: 0 0 60px 0;
  }

  @media (min-width: $screen-md-min) {
    padding: 30px 0 60px 0;

    .region {
      display: flex;
      justify-content: center;
      padding-top: 30px;
    }
  }
}
.site-copyright {
  .block {
    color: var(--white);
    font-size: 14px;

    & > h2 {
      display: none;
    }

    p,
    span {
      display: inline-block;
      line-height: 1.5;

      a {
        color: var(--primary);

        &:hover {
          color: #ddd;
        }
      }
    }
  }

  @media (max-width: $screen-sm-max) {
    .region {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
  }

  @media (min-width: $screen-md-min) {
    .region {
      gap: 30px;

      .block {
        padding-right: 30px;
        border-right: 1px solid #ddd;

        &:last-child {
          padding-right: 0;
          border: 0;
        }
      }
    }
  }
}
.site-copyright ul.menu {
  li {
    line-height: 1.5;
  }

  a {
    text-decoration: none;
    color: #ddd;
    font-size: 14px;

    &:hover {
      color: var(--primary);
    }

    @media (max-width: $screen-sm-max) {
      display: block;
      padding: 5px 0;
      text-align: center;
    }

    @media (min-width: $screen-md-min) {
      display: inline-block;
    }
  }

  @media (min-width: $screen-md-min) {
    display: flex;
    flex-wrap: wrap;
    column-gap: 25px;
  }
}

Dialog

Theme overrides of the jQuery UI dialogs used by Drupal (modals, off-canvas). The dialog markup is created by core drupal.dialog, which the styleguide does not load, so this is a code reference only.

.ui-dialog {
  position: absolute;
  z-index: 1260;
  overflow: visible;
  padding: 0;
  color: #000;
  border: solid 1px #ccc;
  background: #fff;
}

@media all and (max-width: 768px) {
  .ui-dialog {
    width: 92% !important;
  }
}

.ui-dialog .ui-dialog-titlebar {
  border-width: 0 0 1px 0;
  border-style: solid;
  border-color: #ccc;
  border-radius: 0;
  background: #f3f4ee;
  font-weight: bold;
}

.ui-dialog .ui-dialog-titlebar-close {
  border: 0;
  background: none;
}

.ui-dialog .ui-dialog-buttonpane {
  margin-top: 0;
  padding: 5px 18px;
  border-width: 1px 0 0 0;
  border-color: #ccc;
  background: #f3f4ee;
}

/* Form action buttons are moved in dialogs. Remove empty space. */
.ui-dialog .ui-dialog-content .form-actions {
  margin: 0;
}

.ui-dialog .ajax-progress-throbber {
  position: fixed;
  z-index: 1000;
  top: 48.5%;

  /* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
  left: 49%;
  width: 24px;
  height: 24px;
  padding: 4px;
  opacity: 0.9;
  border-radius: 7px;
  background-color: #232323;
  background-image: url(../images/icons/loading-small.svg);
  background-repeat: no-repeat;
  background-position: center center;
}

.ui-dialog .ajax-progress-throbber .throbber,
.ui-dialog .ajax-progress-throbber .message {
  display: none;
}
.ui-dialog--narrow {
  max-width: 500px;
}

@media screen and (max-width: 600px) {
  .ui-dialog--narrow {
    min-width: 95%;
    max-width: 95%;
  }
}

Templates

Page layout: placement of the regions, columns and sidebars. Sources are in sass/templates/, compiled into css/templates.css. The layer comes after the organisms, so it only sets layout properties of the regions and never styles what is inside them. The page layout is templates/layout/page.html.twig.

Page layout

The center of the page with the main content and the sidebars. Below 850px the regions are stacked (main content first), from 850px they are columns of a grid: 220px for the first sidebar, 320px for the second one (220px with two sidebars). Without sidebars the main content is 840px wide and centered. .site-main and the sidebars are query containers, so the content in them adapts to the width of the column.

<div id="center" class="site-center one-sidebar sidebar-first">
  <div class="container">
    <div class="region region-center">
      <aside id="sidebar-first" class="site-sidebar-first sidebar" role="complementary">
        <!-- sidebar_first region -->
      </aside>
      <main id="main" class="site-main" role="main">
        <!-- title and content regions -->
      </main>
    </div>
  </div>
</div>
// Query containers: content in the main column and the sidebars adapts to the
// width of its column (@container), not to the viewport.
.site-main {
  container: main / inline-size;
}

.site-sidebar-first,
.site-sidebar-second {
  container: sidebar / inline-size;
}

.site-center {
  @media (max-width: $screen-sm-max) {
    padding: 30px 0;

    .region-center {
      display: flex;
      flex-direction: column;

      .site-main {
        order: 1;
      }

      .site-sidebar-first {
        order: 2;
      }

      .site-sidebar-second {
        order: 3;
      }
    }
  }

  @media (min-width: $screen-md-min) {
    overflow: hidden;
    padding: 100px 0;

    // Main
    &.sidebar-first {
      .region-center {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 80px;
      }
    }

    &.sidebar-second {
      .region-center {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 80px;
      }
    }

    &.two-sidebars {
      .region-center {
        display: grid;
        grid-template-columns: 220px 1fr 220px;
        gap: 80px;
      }
    }

    &.no-sidebars .site-main {
      width: 840px;
      margin: 0 auto;
    }
  }
}

Pages

Styles for specific pages: search and the user account forms. Sources are in sass/pages/, compiled into css/pages.css. All rules are scoped to the main content (.site-main). The forms are rendered by Drupal core with the theme form templates (templates/form/).

Search

Search page (/search/node): a large search field with the button attached, a help link, the results heading and the list of results (templates/content/search-result.html.twig).

About searching

Search results

  1. Lorem ipsum dolor sit amet

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos velit eveniet a voluptatem ad perspiciatis rerum facilis molestiae.

    Sat, 17 Oct 2026 - 09:00
    Lorem Ipsum
    2 comments
  2. Saepe obcaecati minima

    Quos officiis inventore nam lorem laborum dolorem deserunt laboriosam.

    Fri, 16 Oct 2026 - 09:00
    Dolor Sit
    0 comments
// Search page: search form and results.

.site-main .search-form {
  // Heading of the results, right after the form.
  & + h2 {
    margin-bottom: 35px;
    padding-top: 60px;
    font-size: 20px;
    font-weight: 400;
  }

  .form-wrapper {
    display: flex;
    align-items: end;
    gap: 0;
  }

  .form-type-search {
    width: calc(100% - 142px);
    margin: 0;
  }

  .form-search {
    height: 50px;
    padding-right: 15px;
    padding-left: 15px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 26px;
    line-height: 50px;
  }

  .form-submit {
    width: 142px;
    height: 50px;
    margin: 0;
    padding-right: 30px;
    padding-left: 53px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-image: url("../images/search.svg");
    background-repeat: no-repeat;
    background-position: 24px 50%;
    background-size: 18px 18px;
    line-height: 50px;

    &:hover {
      color: var(--black);
      border-color: var(--primary);
      background-color: var(--primary-vivid);
      background-image: url("../images/search-hover.svg");
    }
  }

  .search-help-link {
    display: inline-block;
    padding: 20px 10px 0 10px;
    font-size: 16px;
  }
}

.site-main ol.search-results {
  margin: 0;
  padding: 0;

  li {
    margin: 0 0 35px 0;
  }
}

.site-main .search-result__title {
  margin: 0 0 10px 0;
  padding: 0;
  color: var(--black);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;

  a {
    color: var(--black);

    &:hover {
      color: var(--primary);
    }
  }
}

.site-main .search-result__snippet strong {
  color: var(--primary);
}

Advanced search

Collapsible advanced search under the search form, shown to users with the Use advanced search permission.

Advanced search
Types
.site-main {
  .search-advanced {
    .form-checkboxes {
      .form-type-checkbox {
        display: flex;
        align-items: center;
      }
    }

    .action {
      margin-top: 9px;

      input {
        width: auto;
        border-radius: 7px;
      }
    }
  }
}

User login

Login form (/user/login): labels above the fields, more padding from 850px.

.site-main {
  .user-login-form {
    padding: 20px 0;

    label {
      display: block;
      margin: 0 0 8px 0;
    }

    .form-text {
      margin-bottom: 8px;
    }

    .form-item {
      margin-top: 0;
      margin-bottom: 30px;
    }

    .form-actions {
      margin-top: 0;
      margin-bottom: 0;
    }

    @container main (width >= #{$container-md-min}) {
      padding: 0 25px;
    }
  }
}

Reset password

Password reset form (/user/password) with a short gray note under the field.

Password reset instructions will be sent to your registered email address.

.site-main {
  .user-pass {
    padding: 20px 0;

    label {
      display: block;
      margin: 0 0 8px 0;
    }

    .form-text {
      margin-bottom: 8px;
    }

    .form-item {
      margin-top: 0;
      margin-bottom: 0;
    }

    .form-actions {
      margin-top: 0;
      margin-bottom: 0;
    }

    p {
      padding: 0 10px;
      color: var(--black-60);
      font-size: 14px;
    }

    @container main (width >= #{$container-md-min}) {
      padding: 0 25px;
    }
  }
}

User registration

Registration form (/user/register) with the user picture upload and the personal contact form setting.

The email address is not made public. It will only be used if you need to be contacted about your account or for opted-in notifications.
Several special characters are allowed, including space, period (.), hyphen (-), apostrophe ('), underscore (_), and the @ sign.
Your virtual face or picture.
Contact settings
Allow other users to contact you via a personal contact form which keeps your email address hidden.
.site-main .user-register-form {
  padding: 20px 0;

  label {
    display: block;
    margin: 0 0 8px 0;
  }

  .form-text {
    margin-bottom: 8px;
  }

  .form-item {
    margin-top: 0;
    margin-bottom: 30px;
  }

  .form-actions {
    margin-top: 0;
    margin-bottom: 0;
  }

  .field--name-user-picture input {
    height: auto;
    padding: 8px 10px;
  }

  [data-drupal-selector="edit-contact"] label {
    display: inline-block;
    margin: 0 0 11px 0;
  }

  @container main (width >= #{$container-md-min}) {
    padding: 0 25px;
  }
}

Components

Single Directory Components in components/: each folder holds the definition (*.component.yml), the template (*.twig), the Sass source and the generated CSS, and optionally JavaScript and images. Drupal attaches the CSS and JS automatically when the component is rendered. Component CSS is outside the cascade layers, so it wins over the theme layers. Previews below use the examples from the component definitions.

Main menu

Main navigation, used by templates/navigation/menu--main--menu.html.twig. From 850px submenus open on hover and keyboard focus (CSS only). Below 850px main_menu.js adds toggle buttons for collapsible submenus; the styleguide does not run it. The preview is placed in the menu region wrapper for the background.

{#
/**
 * @file
 * Main menu component.
 *
 * Renders the menu tree recursively. Submenu toggles for mobile are added by
 * main_menu.js.
 */
#}
{% import _self as menus %}

{% macro menu_links(items, menu_level) %}
  {% import _self as menus %}
  {% if items %}
    {% set level = menu_level + 1 %}
    {%
      set list_classes = [
        'menu',
        'main-menu__list',
        'main-menu__list--level-' ~ level,
        level > 1 ? 'main-menu__list--sub',
      ]
    %}
    <ul class="{{ list_classes|filter(c => c)|join(' ') }}">
    {% for item in items %}
      {%
        set classes = [
          'menu-item',
          item.is_expanded ? 'menu-item--expanded',
          item.is_collapsed ? 'menu-item--collapsed',
          item.in_active_trail ? 'menu-item--active-trail',
          'main-menu__item',
          'main-menu__item--level-' ~ level,
          level > 1 ? 'main-menu__item--sub',
        ]
      %}
      {%
        set link_classes = [
          'main-menu__link',
          'main-menu__link--level-' ~ level,
          level > 1 ? 'main-menu__link--sub',
        ]|filter(c => c)
      %}
      <li{{ item.attributes.addClass(classes) }}>
        {{ link(item.title, item.url, { class: link_classes }) }}
        {% if item.below %}
          {{ menus.menu_links(item.below, menu_level + 1) }}
        {% endif %}
      </li>
    {% endfor %}
    </ul>
  {% endif %}
{% endmacro %}

<div{{ attributes.addClass('main-menu') }}>
  {{ menus.menu_links(items, 0) }}
</div>
$schema: https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json
name: Main menu
description: Main navigation. Dropdowns on hover/focus on desktop, collapsible submenus on mobile.
group: Navigation
status: stable
props:
  type: object
  properties:
    items:
      type: [object, array]
      title: Menu items
      description: Menu tree as provided to menu.html.twig (title, url, below, attributes, is_expanded, is_collapsed, in_active_trail).
libraryOverrides:
  dependencies:
    - core/drupal
    - core/once
// Main menu. Classes are set in main_menu.twig:
// - .main-menu__list / __item / __link on every level,
// - --level-N modifiers (1 = top level) and --sub for level 2 and deeper.
// Selectors are prefixed with .main-menu so they win over the generic menu
// atoms (ul.menu li).

// Mobile: collapsible submenus (main_menu.js).
@media (max-width: $screen-sm-max) {
  .main-menu .main-menu__item {
    position: relative;
    line-height: 1.5;

    &:hover {
      color: var(--white);
    }
  }

  .main-menu .main-menu__link {
    display: block;
    padding: 10px 80px 10px 15px;
    text-decoration: none;
    color: var(--white);
    border-bottom: 1.5px solid var(--primary-darker);
    font-family: Geologica, sans-serif;
    font-size: 26px;
  }

  .main-menu .main-menu__list--sub {
    display: none;

    &.open {
      display: block;
    }
  }

  .main-menu .main-menu__link--sub {
    padding: 10px 80px 10px 30px;
    color: var(--black-80);
    font-size: 22px;
  }

  .main-menu .main-menu__link--level-3 {
    padding: 10px 80px 10px 45px;
  }

  .main-menu .main-menu__link--level-4 {
    padding: 10px 80px 10px 60px;
  }

  .main-menu .main-menu__link--level-5 {
    padding: 10px 80px 10px 75px;
  }

  .main-menu .main-menu__link.is-active,
  .main-menu .main-menu__link.is-active:hover {
    color: var(--white);
  }

  .main-menu .menu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.05s;
    border-left: 1px solid var(--primary-vivid-25);
    background: url("images/mobile-arrow.svg") no-repeat 50% 50%;
    appearance: none;

    &:focus-visible {
      outline: 2px solid var(--white);
      outline-offset: -4px;
    }

    &.open {
      transform: rotate(180deg);
    }
  }

  .main-menu .main-menu__list--sub .menu-toggle {
    background-image: url("images/mobile-arrow2.svg");
  }
}

// Desktop: dropdowns on hover and keyboard focus.
@media (min-width: $screen-md-min) {
  .main-menu {
    position: relative;
  }

  .main-menu .main-menu__list {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .main-menu .menu-toggle {
    display: none;
  }

  .main-menu .main-menu__item {
    position: relative;
    line-height: 1;
  }

  .main-menu .main-menu__link {
    display: block;
    padding: 0 30px;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    color: var(--white);
    font-family: Geologica, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 67px;
  }

  .main-menu .main-menu__item:hover > .main-menu__link,
  .main-menu .main-menu__item:focus-within > .main-menu__link {
    background-color: var(--black);
  }

  // Active top level item, after the hover rule so it keeps its color while
  // the item has focus.
  .main-menu .main-menu__link--level-1.is-active,
  .main-menu .menu-item--active-trail > .main-menu__link--level-1 {
    background-color: var(--primary);

    &:hover {
      background-color: var(--black);
    }
  }

  // Submenus.
  .main-menu .main-menu__list--sub {
    display: none;
  }

  .main-menu .main-menu__item:hover > .main-menu__list,
  .main-menu .main-menu__item:focus-within > .main-menu__list {
    position: absolute;
    z-index: 1000;
    top: 67px;
    left: 0;
    display: block;
  }

  .main-menu .main-menu__item--sub {
    border-bottom: 1px solid var(--black-80);

    &:first-child {
      border-top: 8px solid var(--black);
    }

    &:last-child {
      border-bottom: 8px solid var(--black);
    }
  }

  .main-menu .main-menu__item--sub.menu-item--expanded > .main-menu__link {
    background: url("images/arrow-menu.svg") no-repeat calc(100% - 15px) 50%;
    background-size: auto 10px;
  }

  .main-menu .main-menu__item:hover .main-menu__link--sub,
  .main-menu .main-menu__item:focus-within .main-menu__link--sub {
    padding: 13px 60px 13px 30px;
    text-align: left;
    background-color: var(--black);
    font-size: 16px;
    font-weight: normal;
    line-height: 1;
  }

  .main-menu .main-menu__item--sub:hover > .main-menu__link,
  .main-menu .main-menu__item--sub:focus-within > .main-menu__link {
    background-color: var(--primary);
  }

  // Third level opens to the right.
  .main-menu .main-menu__item--sub:hover > .main-menu__list,
  .main-menu .main-menu__item--sub:focus-within > .main-menu__list {
    position: absolute;
    top: -8px;
    left: 100%;
    border-left: 1px solid transparent;
  }
}
/**
 * @file
 * Main menu component: collapsible submenus on mobile screen.
 */

((Drupal, once) => {
  /**
   * Opens or closes a submenu and syncs the toggle button state.
   *
   * @param {HTMLButtonElement} button
   *   The submenu toggle button.
   * @param {boolean} open
   *   Whether the submenu should be open.
   */
  function setOpen(button, open) {
    const submenu = button.previousElementSibling;
    button.setAttribute('aria-expanded', open ? 'true' : 'false');
    button.classList.toggle('open', open);
    submenu.classList.toggle('open', open);
  }

  Drupal.behaviors.holyMainMenu = {
    attach(context) {
      once('holyMainMenu', '.main-menu ul > li', context).forEach((li) => {
        const submenu = li.querySelector(':scope > ul');
        if (!submenu) {
          return;
        }

        const link = li.querySelector(':scope > a, :scope > span');
        const title = link ? link.textContent.trim() : '';
        if (!submenu.id) {
          submenu.id = `menu-submenu-${Math.random().toString(36).slice(2, 10)}`;
        }

        // The toggle is placed after the submenu, CSS relies on that order.
        const button = document.createElement('button');
        button.type = 'button';
        button.className = 'menu-toggle';
        button.setAttribute('aria-controls', submenu.id);
        button.setAttribute(
          'aria-label',
          Drupal.t('Show submenu for @title', { '@title': title }),
        );
        li.appendChild(button);

        // Open the active trail by default.
        setOpen(button, li.classList.contains('menu-item--active-trail'));

        button.addEventListener('click', () => {
          setOpen(button, button.getAttribute('aria-expanded') !== 'true');
        });
      });
    },
  };
})(Drupal, once);