By the end of this video you have your own sub-theme running on top of W3CSS Theme, so your CSS and template overrides survive the next theme update instead of being wiped by it.
What ships inside the theme
You do not have to build a starter from scratch. A folder named drupal8_w3css_subtheme sits inside the theme itself. Its .info.yml declares base theme: drupal8_w3css_theme, repeats the parent's 22 regions, and registers one library holding a single stylesheet and a single JavaScript file — the two files you are meant to edit.
The rename, step by step
- Copy
drupal8_w3css_subthemeout of the theme folder and intothemes/custom. - Rename the copied folder to your own machine name. The documentation uses
w3css_subtheme. - Rename the three files inside it to match the folder: the
.theme, the.info.ymland the.libraries.yml. - Edit the
.info.yml: change the human-readablename:, then change the library reference fromdrupal8_w3css_subtheme/d8w3css-subtheme-globaltow3css_subtheme/d8w3css-subtheme-global. Only the part before the slash changes — the part after it is the library key and must keep matching the.libraries.yml. - Leave the YAML indentation exactly as it is, then install the sub-theme at
/admin/appearanceand set it as default.
A starter is not the same as a published sub-theme
Three finished sub-themes are published separately: Amun, Amunet and Anhur. Each one declares base theme: drupal8_w3css_theme in its own info file, and each adds a 23rd region, Fixed Search Bar, on top of the parent's 22 — click the search icon and a sticky search bar drops in from the top. They are alternative page layouts, not blank starters. If you pick one and then want custom CSS, you still create your own sub-theme of it, using the amun_subtheme folder shipped inside Amun.
Parent and sub-themes all declare ^9 || ^10 || ^11 || ^12, so the same procedure holds across four major versions — details on the W3CSS Theme page. If your overrides do not appear after installing, work through troubleshooting CSS in a Drupal sub-theme before changing any code.
Prefer a sub-theme configured properly the first time? That is Drupal theming — or get in touch and describe the site.