GNOME Bugzilla – Bug 773030
Buttonlabel to proceed to an insecure website is not matching button size if translated into german
Last modified: 2016-10-17 17:08:12 UTC
Created attachment 337786 [details] example screenshot In epiphany 3.22.1 the translated text of the button to proceed to an insecure website is not matching the available space of the button. The text is translated into german. See attached image as an example.
Looks like the width of the button is hardcoded to 200px in error.css. This would be easy to fix in GTK+, but I don't know how to do it in CSS. Maybe it's easy, or maybe not: I just don't know, we need someone who understands CSS. We also need to make sure that both buttons always get displayed with the same width.
(In reply to Michael Catanzaro from comment #1) > Looks like the width of the button is hardcoded to 200px in error.css. This > would be easy to fix in GTK+, but I don't know how to do it in CSS. A quick fix would be to set the width to "auto". That would make the button to have the same width as the text contained. However, it will look bad for shorter texts, since the button will be shorter too. Another fix (which seems more appropriate to me) would be to leave the width property unchanged and add the "max-width" property with a value of 100%. This will make the button have a default width of 200px and in the case of a longer text that exceeds this width, the button will resize accordingly. > We also need to make sure that both buttons always get displayed with > the same width. I don't think it's possible to achieve this with CSS only. Considering that both the buttons should resize according to the text inside them, they will not always have the same width. Some JavaScript code will be required to make one button get the width of another in case they differ.
OK, thanks for the feedback. Adrian suggested using min-width, which is slightly nicer than using both width and max-width, so I'll go with that. Someone else can mess with aligning the button sizes if desired.
The following fix has been pushed: ee29f6d Ensure error page buttons expand to fit translations
Created attachment 337877 [details] [review] Ensure error page buttons expand to fit translations