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

something went wrong with logo #1411

Open
matkoniecz opened this issue Oct 2, 2024 · 8 comments
Open

something went wrong with logo #1411

matkoniecz opened this issue Oct 2, 2024 · 8 comments

Comments

@matkoniecz
Copy link
Contributor

screen01
not sure why it was not caught in my earlier tests?

@matkoniecz
Copy link
Contributor Author

It looks like longer text caused box to become wider and failing out of their lines.

Forcing them with max-width: 107px; works but obviously it is not a solution.

@matkoniecz
Copy link
Contributor Author

font-size: .8em; in .category-title is a bit more proper hack but... Still a hack.

@mdsimpson42
Copy link
Contributor

This did happen when we originally changed the category names, but I tested it at a range of Zoom levels on my local machine and on Staging... The little logo at the top and in the key was getting stretched, which I fixed.

I just tried it now, locally, on staging and on production and I can't replicate.
Does it happen at particular zoom levels or resolutions?

@mdsimpson42
Copy link
Contributor

Or in a particular browser?

@matkoniecz
Copy link
Contributor Author

not sure why it was not caught in my earlier tests?

That is because for body following definition is new, and replaced older: font-family: var(--bs-font-sans-serif);

I just tried it now, locally, on staging and on production and I can't replicate.

note that production has additional change reducing text size

Does it happen at particular zoom levels or resolutions?

100%, 1920 x 1200 px

Or in a particular browser?

Firefox 130.0.1 (64-bit)

@matkoniecz
Copy link
Contributor Author

problem disappears on heavy zooming

it appears to be reliably triggered by editing labels, say with inspector to have oversized text length:

screen09

@matkoniecz
Copy link
Contributor Author

.category-title {
	display: block;
	text-align: center;
	font-size: .9em;
	margin: 0;
	padding: .6em;
}

removing padding: .6em; reduces problem and text looks fine

screen02
screen01

still, Age & history looks better with larger padding

And it still does not eliminate root cause.

Adding soft hyphens sort-of works but may result in splitting words where it is not really needed.

screen03

matkoniecz added a commit to matkoniecz/colouring-core that referenced this issue Oct 21, 2024
See colouring-cities#1411

This is a workaround, not a proper fix.
matkoniecz added a commit to matkoniecz/colouring-core that referenced this issue Oct 21, 2024
See colouring-cities#1411

This is a workaround, not a proper fix.
@mdsimpson42
Copy link
Contributor

Yeah, it's a tricky one. The padding was to try and make it look nice, Polly wanted, for example, Age & History not to appear all in one line, as it does on the second picture. I think she wanted the "&" in Typology and size would be on the next line too. I was just trying to do something that doesn't require too much additional code or adding custom code for each category...

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