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

Use hyphens: auto #15

Closed
mbarkhau opened this issue Mar 11, 2021 · 4 comments
Closed

Use hyphens: auto #15

mbarkhau opened this issue Mar 11, 2021 · 4 comments

Comments

@mbarkhau
Copy link

Since scroll uses a text-align: justify; I suggest it also use hyphens: auto; and the html tag should include a lang attribute, e.g. <html lang=en-US"> so the browser knows how to do syllabification.

@breck7
Copy link
Owner

breck7 commented Mar 11, 2021

All makes sense to me.

What would be a good way to not only add those 2 lines, but some tests so in the future people could see the impact they have and why they are important?

  • What does it look like before and after? (screenshots would be nice)
  • How does that change with different languages?
  • How often does the problem come up when we don't have those 2 lines?

I'm used to writing regression tests for code (here's what was happening; that's now fixed; and we've added this automated test so we don't break it again), but not sure the best practices for doing the same thing except to test the against the artefacts generated by displaying HTML+CSS.

There must be some type of paid SAAS tool out there that we could buy to provide something like this.

Sorry this is getting a bit general, but I would like to fix the issue you brought up and figure out a general process for adding the "regression tests" equivalent for adding lines to CSS.

@mbarkhau
Copy link
Author

mbarkhau commented Mar 11, 2021

As it happens, this is an open problem for me on another project also, so no worries about the digression.

Rather than a SAAS tool, the first thing I would look for is html->png renderer that can be run in a GitHub action. The action would:

  1. Render the HTML->PNG
  2. Compare the output to reference files in the repository
  3. Fail if they are different

If somebody wants to change the output (because tests will fail if they don't) then their commit and PR will have to include the updated png images, in which case the GitHub image diff viewer should provide insight as to the changes.

There are other locally available tools, such as Sublime Text which also provide a good image diff viewer.

@breck7
Copy link
Owner

breck7 commented Mar 12, 2021

Do you have a screenshot for this one? Looking for a before and after. Not 100% sure I understand the bug/fix.

@mbarkhau
Copy link
Author

The best way to compare these is to "Open image in new tab" for both and then tab back and forth. Aka. blink comparison.

Screenshot from 2021-03-12 16-06-32
Screenshot from 2021-03-12 16-06-34

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

No branches or pull requests

2 participants