Created on 20 March 2024, 9 months ago
Updated 18 April 2024, 8 months ago

Problem/Motivation

We are finding that the UI elements for EditorA11y are small or difficult to notice by content authors.

We would like to customize the UI elements with CSS; however, it seems like the styles are hardcoded with the internal style tag (see attached image).

Is there an easy way of doing it?

πŸ’¬ Support request
Status

Fixed

Version

2.1

Component

Documentation

Created by

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

Comments & Activities

  • Issue created by @mweiler
  • Assigned to itmaybejj
  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    I have definitely considered parameterizing the theme in its entirety -- but before I open that can of worms -- would you be willing to share the CSS you would like to inject? I may just adopt it into the repo as another base theme.

    There is currently a way for themes or modules to override colors and border widths, by setting a global editoria11yOptionsOverride variable with an override for the default theme parameters. Editoria11y-drupal.js checks for this global before drawing the elements.

    Would look something like this:

    var editoria11yOptionsOverride = true;
    var editoria11yOptions = function (parameterBag) {
      let options = parameterBag;
      options['sleekTheme'] = {
            bg: '#fffffe',
            bgHighlight: '#7b1919',
            text: '#20160c',
            primary: '#276499',
            primaryText: '#fffdf7',
            secondary: '#20160c',
            button: 'transparent', // deprecate?
            panelBar: '#fffffe',
            panelBarText: '#20160c',
            panelBarShadow: 'inset 0 -1px #0002, -1px 0 #0002',
            panelBorder: 0,
            activeTab: '#276499',
            activeTabText: '#fffffe',
            outlineWidth: 0,
            borderRadius: 1,
            ok: '#1f5381',
            warning: '#fad859',
            alert: '#b80519',
            focusRing: '#007aff',
          };
      return options;
    }

    I...should document that, but let's finish this conversation first, since we might think of a better way to handle this.

  • i'll look into it, and see get back to you.

  • πŸ‡¨πŸ‡¦Canada ryanrobinson_wlu

    I work with @mweiler so I'll jump in here.

    The biggest thing is size of the floating icon in the bottom. We'd like it significantly bigger, something like:

    .shut #toggle {
        min-width: 72px;
        height: 72px;
    }
    
    .pass.shut #toggle {
        font-size: 64px;
    }
    

    Then increase the text of the tip wrapper to match the font size of everything else on our site, instead of set at 14px, and its colour to match our main font colour (in our case defined as a variable for our exact black).

    .wrapper {
      font-size: 1rem;
      color: var(--black);
    }
    

    I might also look at changing the colours to match our brand colours - and from your previous comment maybe I can already do that - but that's not a high priority.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Great; thank you. I'll take a look next time I'm in the code. I may just pull the whole theme out into a separate object.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    OK this is going to work. I want to test the new branch more before tagging a release, but it will add params that let you pick a base font size and family, as well as add custom CSS to any of the Web components.

    I'm hoping to push this by the end of the week.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Alright -- tagged a release with hopefully all you need. I added instructions for inserting custom parameters to the module description, and added the list of params to a new theming section in the main library's configuration notes.

  • Status changed to Fixed 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Hi folks -- just wanted to revisit this, because the parameters have changed. Please check the 2.1.11 release notes β†’ for details.

Production build 0.71.5 2024