Create a content entity with properties to store HTML, CSS, and JS values.
Projects
Mantra started as a black and white theme - let's add color for the background, text, and links.
First we need to know how to set variables and use them in css.
Themes can include config for default block placement.
Will the starter kit include this in setup?
I set up a new text filter to use CKEditor 5 called Content.
I added a few buttons for lists, tables, blockquotes. Also replaced the image button with media library, and added code block and source buttons.
name: Mantra
description: Mantra theme.
type: theme
core_version_requirement: ">=8"
base theme: false
Copy menu.html.twig from Classy.
Add attach_library('mantra_theme/menu').
mantra_theme.libraries.yml
Drupal themes inherit libraries from core modules and base themes.
Inherited libraries can be extended or overridden in the theme info file.
mantra_theme.info.yml
CKEditor 5 is now loaded without an iFrame, so it inherits the styles from the current theme.
mantra_theme.info.yml
ckeditor5-stylesheets:
- css/drupal/ckeditor5.css