Theme

Generated from Starter Kit theme to get initial fixes and enhancements.

Base theme set to false (Instead of Stable9) to get latest changes from core.

mantra_starter.info.yml
name: Mantra Starter
type: theme
'base theme': false
starterkit: true
core_version_requirement: ^9 || ^10 || ^11
generator: 'starterkit_theme:9.5.1'
version: VERSION

dependencies:
  - fences:fences
  - vite:vite

regions:
  header: Header
  branding: Branding
  secondary_menu: Secondary menu
  primary_menu: Primary menu
  menu: Menu
  breadcrumbs: Breadcrumbs
  messages: Messages
  hero: Hero
  title: Title
  help: Help
  pre_content: Pre content
  content_top: Content top
  content: Content
  content_bottom: Content bottom
  sidebar_first: Sidebar first
  sidebar_second: Sidebar second
  pre_footer: Pre footer
  footer: Footer

libraries:
  - mantra_starter/global

libraries-extend:
  # Core
  core/drupal.dialog:
    - mantra_starter/dialog
  core/drupal.dropbutton:
    - mantra_starter/dropbutton
  core/drupal.progress:
    - mantra_starter/progress
  core/drupal.message:
    - mantra_starter/messages
  core/drupal.vertical-tabs:
    - mantra_starter/vertical-tabs
  facets/widget:
    - mantra_starter/facets
  field_ui_extras/summary:
    - mantra_starter/field_ui_extras
  file/drupal.file:
    - mantra_starter/file
  media_library/view:
    - mantra_starter/media_library_view
  media_library_edit/admin:
    - mantra_starter/media_library_edit
  menu_select/menu_select:
    - mantra_starter/menu_select
  toolbar/toolbar:
    - mantra_starter/toolbar
  user/drupal.user:
    - mantra_starter/user
  views_tree/views_tree:
    - mantra_starter/views_tree
  # Modules
  cl_editorial/options-filter:
    - mantra_starter/cl_editorial
  field_group/element.horizontal_tabs:
    - mantra_starter/field_group.horizontal_tabs
  formtips/formtips:
    - mantra_starter/formtips
  fullcalendar_view/libraries.fullcalendar-theme:
    - mantra_starter/fullcalendar_view
  popular_tags/popular_tags:
    - mantra_starter/popular_tags
  prism/prism:
    - mantra_starter/prism
  sdc_tags/tagging:
    - mantra_starter/sdc_tags
  views_ui/admin:
    - mantra_starter/system_admin

libraries-override:
  system/admin: mantra_starter/system_admin
  block/drupal.block.admin:
    css:
      theme:
        css/block.admin.css: libraries/drupal/block-admin.theme.css
  bpmn_io/ui:
    css:
      component:
        css/bpmn_io.css: libraries/modules/bpmn_io.css
  calendar_view/calendar:
    css:
      component:
        css/calendar-view.default.css: libraries/modules/calendar_view.css
  ckeditor_details/detail:
    css:
      theme:
        css/detail.editor.css: false # Styled global details.css
  entity_embed/drupal.entity_embed.dialog:
    css:
      theme:
        css/entity_embed.dialog.css: false # Unnecessary.
  drd/general:
    css:
      component:
        css/drd.css: libraries/modules/drd.component.css # Some nice styles, but breaks layout.
  field_ui/drupal.field_ui.manage_fields:
    css:
      component:
        css/field_ui_add_field.module.css: false # Override loaded with admin library.
  layout_builder/drupal.layout_builder:
    css:
      theme:
        css/layout-builder.css: libraries/drupal/layout-builder.theme.css

  node/form: {css: {layout: {css/node.module.css: false}}}
  node/drupal.node: {css: {layout: {css/node.module.css: false}}}
  views_ui/admin.styling: {css: {theme: {css/views_ui.admin.theme.css: libraries/drupal/views_ui.admin.theme.css}}}

ckeditor5-stylesheets:
  - libraries/drupal/ckeditor5.stylesheet.css

vite:
  enableInAllLibraries: true
  enableInAllComponents: true

CSS Reset

Not using a reset currently

UnoCSS options

https://unocss.dev/guide/style-reset

Previously

core/normalize is included as the base css reset in drupal themes.

https://github.com/necolas/normalize.css/blob/master/normalize.css

UnoCSS/Vite Starter Theme

https://www.drupal.org/project/unocss_starter

  1. Create new theme
    • [lando/ddev] php web/core/scripts/drupal generate-theme mytheme
    • cd web/themes/mytheme
  2. Create vite project
    • npm create vite@latest .