-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add option to make Site Title stretch and have its font size adjusted automatically #56324
Comments
Thank you @carolinan, I updated the title! |
Thank you |
I looked into this. The challenge is to be able to do it with text that can be of any length. There are two possibilities, neither simple:
|
Would it help if this only worked with one or two words? From most sites I see this in, no more than that is often used. |
Only if we know the length of the words! |
I get the idea. However, it's not what it looks like. The first website uses an image as its footer, while the second one uses an svg file as its header. All of those can be easily achieved within WordPress without having to add a very hard solution to serve an unpopular design. To replicate the design, just use a full width image and svg block. |
To let the user input any text and then calculate the font size so that the text fills 100% width of its container, I think you'd only need a few lines of JS. I know adding JS is complicated, but just wanted to offer this up as a possible solution that doesn't require a library. https://codepen.io/hans/pen/WxBZoQ If we knew the text would not change, I think you could do it with just CSS. |
It would be great to be able to make site titles like the one in this website’s footer to be full width no matter if it’s just one word or a sentence. I’ve seen this a lot in footers and headers.
Perhaps a toggle in the editor that said “make site title full width” and it would automatically scale to its biggest size. We could start with just this block and perhaps extend this feature to others (such as headings).
This would be a nice detail to build themes and websites without having to add any additional code.
cc: @iamtakashi @henriqueiamarino
The text was updated successfully, but these errors were encountered: