Button theme in wywisyg context

Created on 12 July 2024, 5 months ago
Updated 14 July 2024, 5 months ago

Problem/Motivation

I'm just looking at the button styles and I'm looking for guidance about how the light/dark theme is designed to be used with them.

The button styles are all "ligth" and so if these are used in the context of the dark theme, is this "correct"? or is it supposed to be arbitrary "whatever looks good".
https://git.drupalcode.org/project/civictheme/-/blob/1.x/config/install/...

I also know (at least this is still a problem) that changeing a button design from one to another the classes are additiive and it doesn't replace the styles, so I can see you might choose to pick "light" and not have two choices in the wyswiyg, but I was looking for something in the documenation about it and thought i'd ask when I couldn't find anything.

I'm still deciding on my approach for this site build ... is there a "ct-inherit" class which can be used here instead of fixating on one or the other?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Closed: works as designed

Version

1.8

Component

Code

Created by

🇦🇺Australia sime Melbourne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sime
  • Status changed to Closed: works as designed 5 months ago
  • 🇦🇺Australia alex.skrypnyk Melbourne

    For any sub-component of the `Basic content` UIKit component, there is a CSS override that forces parent component's theme on the descendant components - buttons, heading, paragraphs etc. etc.

    Please try applying a button style and switching the `Content` component to Dark to see that these styles apply automatically.

    The only reason for the Drupal's WYSIWYG to have `ct-theme-light` in the button (and other components) styles is to provide an editor's styles (CSS included in the WYSIWYG editor) in the admin theme, like Claro, which is presumably uses "light" theme.

    So, there is nothing you need to do - the `ct-inherit` class is not needed as it is already implemented and automatically handled.

Production build 0.71.5 2024