Problem/Motivation

Adminimal currently has a quite unspecific CSS selector for styling <h1> (page title) tags:

.adminimal h1, .adminimal .heading-a {
    font-weight: 300;
    margin-bottom: 19px;
    margin-bottom: 1rem;
    font-size: 2.35em;
    line-height: 1.2em;
    color: #fff;
}

Styling all <h1> in white color is problematic when combined with formatted text fields, which also can contain a <h1> and makes them invisible for editors.

Concrete Example

The widely used Paragraphs module has a "preview" form display widget which prints formatted text fields without the surrounding <iframe> from CKeditor. In a case like this editorial headlines inherit the white color from the page title, making them invisible to the editor.

Proposed resolution

Use a more specific CSS selector to avoid interference with editorial texts , e.g.

.adminimal .page-title, .adminimal .heading-a {
    font-weight: 300;
    margin-bottom: 19px;
    margin-bottom: 1rem;
    font-size: 2.35em;
    line-height: 1.2em;
    color: #fff;
}

The .page-title class is added by classy theme, which should make it safe enough for Adminimal to rely upon.

Comments

hudri created an issue. See original summary.

ious’s picture

StatusFileSize
new334 bytes

Hi there,

A solution was found there : https://www.drupal.org/project/adminimal_theme/issues/2848335

I am testing this patch which is similar based on the dev branch.

Note: First patch ever...

ious’s picture

StatusFileSize
new334 bytes

Update patch following error:

bin/composer require drupal/adminimal_theme:1.x-dev --prefer-dist
./composer.json has been updated
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/adminimal_theme (dev-1.x 15ce397): Cloning 15ce3977e7 from cache
  - Applying patches for drupal/adminimal_theme
    https://www.drupal.org/files/issues/2925553-Change-CSS-styles-of-h1.patch (Change CSS styles of header 1)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2925553-Change-CSS-styles-of-h1.patch
Anatoliy Vorobyov’s picture

StatusFileSize
new335 bytes

Patch added.

bandanasharma’s picture

Status: Active » Needs review
asya_asina’s picture

The patch from comment 4 applied and working.

andrtroe’s picture

Version: 8.x-1.3 » 8.x-1.x-dev
Issue tags: +Adminimal Release 8.x-1.5

andrtroe’s picture

Status: Needs review » Fixed
andrtroe’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.