Skip to content

Commit 86d5722

Browse files
authored
Merge pull request #1391 from mathjax/update/css-colors
Move colors to CSS and fix problems with magnification of enclosures
2 parents a14d976 + cf81423 commit 86d5722

13 files changed

Lines changed: 396 additions & 375 deletions

File tree

ts/a11y/complexity/collapse.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
AbstractMmlTokenNode,
2727
TextNode,
2828
} from '../../core/MmlTree/MmlNode.js';
29+
import { PropertyList } from '../../core/Tree/Node.js';
2930
import { ComplexityVisitor } from './visitor.js';
3031

3132
/*==========================================================================*/
@@ -584,9 +585,10 @@ export class Collapse {
584585
const factory = this.complexity.factory;
585586
const marker = node.getProperty('collapse-marker') as string;
586587
const parent = node.parent;
587-
const variant = node.getProperty('collapse-variant')
588-
? { mathvariant: '-tex-variant' }
589-
: {};
588+
const variant = { 'data-mjx-collapsed': true } as PropertyList;
589+
if (node.getProperty('collapse-variant')) {
590+
variant.mathvariant = '-tex-variant';
591+
}
590592
const maction = factory.create(
591593
'maction',
592594
{

ts/a11y/explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export function ExplorerMathDocumentMixin<
413413
fill: 'white',
414414
},
415415
'mjx-help > svg > circle:nth-child(2)': {
416-
fill: 'rgba(0, 0, 255, 0.2)',
416+
fill: 'var(--mjx-bg1-color)',
417417
r: '7px',
418418
},
419419
'mjx-help > svg > line': {

ts/a11y/explorer/ExplorerPool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import * as me from './MouseExplorer.js';
3030
import { TreeColorer, FlameColorer } from './TreeExplorer.js';
3131

3232
import { Highlighter, getHighlighter } from './Highlighter.js';
33-
// import * as Sre from '../sre.js';
3433

3534
/**
3635
* The regions objects needed for the explorers.
@@ -360,6 +359,7 @@ export class ExplorerPool {
360359
protected setPrimaryHighlighter() {
361360
const [foreground, background] = this.colorOptions();
362361
this._highlighter = getHighlighter(
362+
LiveRegion.priority.primary,
363363
background,
364364
foreground,
365365
this.document.outputJax.name
@@ -371,6 +371,7 @@ export class ExplorerPool {
371371
*/
372372
protected setSecondaryHighlighter() {
373373
this.secondaryHighlighter = getHighlighter(
374+
LiveRegion.priority.secondary,
374375
{ color: 'red' },
375376
{ color: 'black' },
376377
this.document.outputJax.name

0 commit comments

Comments
 (0)