Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Merge requests
  • !1394

feat(color-extension): add class names

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/barillax/add-class-to-color-extension into master Feb 19, 2016
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: barillax

We have a custom extension that sometimes sets the color of containing elements to green (in addition to some other interactive behavior it adds). However, we wanted to be able to defer to overridden colors that were set by the color.js extension. In pseudocode:

$ x + \mycustomextension[y] $

y is green as a side effect of \mycustomextension

$ x + \color{red} \mycustomextension[y] $

y is red due to \color

To accomplish this, we needed color.js to set a class, mjx-extension-color on the .mjx-mstyle element that it creates so that we could adjust our CSS to color: inherit when .mjx-extension-color is an ancestor. Without this class, we can't distinguish between overridden colors and overridden sizes, for example.

This PR includes the simple changes to color.js to accommodate this. I'm open to suggestions for a better class name than mjx-extension-color.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/barillax/add-class-to-color-extension