Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS and Intent #517

Merged
merged 1 commit into from
Nov 14, 2024
Merged

CSS and Intent #517

merged 1 commit into from
Nov 14, 2024

Conversation

dginev
Copy link
Contributor

@dginev dginev commented Nov 12, 2024

Fixes #441 .

This PR adds a single example and some minimal text, mostly to start discussion on what the exact framing should be. Completely open to being fully reworked.

A preview is visible at the fork:
https://dginev.github.io/mathml/spec.html#mixing_intent_examples_css

@davidcarlisle
Copy link
Collaborator

I quite like the example and the introductory text, I wonder if we could avoid suggesting the duplication and use a selector such as

<!DOCTYPE html>
<html>
<head>
  <style>
    *[intent*="highlighted-result"] {padding:0.1em;background-color:lightgreen;}
    *[intent*="highlighted-step"] {padding:0.1em;background-color:lightyellow;}
  </style>
</head>
<body>

 
<math>
<mn>1</mn><mo>+</mo>
<mrow intent="highlighted-step($step)">
  <mfrac arg="step"><mn>6</mn><mn>2</mn></mfrac>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>1</mn><mo>+</mo>
<mn intent="highlighted-result(3)">3</mn>
<mi>x</mi>
</math>
</body>
</html>

although that may stress the current example display in the spec which isn't set up for separate css, in a real document it would save a lot of duplication though.

This is just musing though the example could go in as it is,

@NSoiffer
Copy link
Contributor

Very nice!

@NSoiffer NSoiffer merged commit ab5e122 into w3c:main Nov 14, 2024
2 of 3 checks passed
github-actions bot added a commit that referenced this pull request Nov 14, 2024
SHA: ab5e122
Reason: push, by NSoiffer

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intent and style (mathcolor, CSS, others?)
3 participants