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

refactor(Rune): drop halves-group container for two-color chars #172

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

IepIweidieng
Copy link
Collaborator

The two-color-word effect, before and after this change. They should look the same despite the difference of HTML layout.

image

Why

By the PR of PttChrome mentioned below, it is known that two-color characters are possible without using an outer <span>.

How

  • src/components/cells/Rune.tsx
    • drop the use of CSS class .halves-group
    • use react.Fragment (<> </>) to replace the previous outer <span>
    • make classNamesGroup (for styling the previous outer <span>) appended to classNames0 (for styling each two-color char)
  • src/components/cells/ContentRenderer.module.css
    • drop CSS class .halves-group
    • replace .halves styling with .o styling from the PttChrome PR

Related Issues

#122, where the support of two-color character display has been introduced.

References

robertabcd/PttChrome#102

See robertabcd/PttChrome#102 for references.

* src/components/cells/Rune.tsx
    * drop the use of CSS class .halves-group
    * use react.Fragment (`<> </>`) to replace the previous outer `<span>`
    * make classNamesGroup (for styling the previous outer `<span>`)
      appended to classNames0 (for styling each two-color char)
* src/components/cells/ContentRenderer.module.css
    * drop CSS class .halves-group
    * replace .halves styling with .o styling from the PttChrome PR
@chhsiao1981 chhsiao1981 merged commit 4b141e7 into main Mar 23, 2024
1 check passed
@chhsiao1981
Copy link
Collaborator

(deployed as 0.14.5)

@IepIweidieng IepIweidieng deleted the refactor-two-color-char branch March 25, 2024 16:01
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.

2 participants