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

Site Title: A few styling option ideas #23228

Closed
alaczek opened this issue Jun 17, 2020 · 16 comments
Closed

Site Title: A few styling option ideas #23228

alaczek opened this issue Jun 17, 2020 · 16 comments
Labels
[Block] Site Title Affects the Site Title Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")

Comments

@alaczek
Copy link

alaczek commented Jun 17, 2020

As we get closer to Full Site Editing, I wanted to suggest a few ideas for site title styling options:

Example design:
image

image

image

image

  • margin/padding - headers and footers are often the areas where tight control over spacing (especially vertical) is required, for example to create a compact header like this:

image

  • font-size / line-height

(hat tip to @iamtakashi for these header designs)

@Addison-Stavlo
Copy link
Contributor

Nice suggestions and visuals!

I think the letter spacing is great style idea for this block. We can save the site title in all caps to achieve that effect, but maybe there are cases where we would want standard casing in all other circumstances?

#23007 Is currently adding font and background colors, font-size, and line height. The line height in this case seems to achieve the effect of vertical margin/padding.

Another odd style thing I have noticed, is that in being a <h1> element it can pick up styles supplied by themes for headings. For example twentynineteen-blocks it gets this odd tick mark that are applied to headings:

Screen Shot 2020-06-18 at 4 50 45 PM

@alaczek
Copy link
Author

alaczek commented Jun 19, 2020

The line height in this case seems to achieve the effect of vertical margin/padding.

It might! But from my experience designing themes, I suspect margins and padding will play a part too.

One more idea - adding support for bold and italics text styling options.

@ianstewart
Copy link
Contributor

One more idea - adding support for bold and italics text styling options.

+1. The full gamut of rich text would be valuable — plus, it'd be nice to have the option to have the title be a link as well.

@Addison-Stavlo
Copy link
Contributor

+1. The full gamut of rich text would be valuable — plus, it'd be nice to have the option to have the title be a link as well.

Definitely! I think RichText itself is out of the question (#21087 (comment) / #21087 (comment)) due to technical reasons for how the site title entity is saved and consumed - but it is possible to set up the same settings at a block wide level.

The difference being, with RichText we could select a section of the title to Bold, italic, make a link, etc (ex "My Awesome Site". But its possible set up block wide attributes to apply these settings across the entire title - (ex "My Awesome Site" )

@iamtakashi
Copy link

But its possible set up block wide attributes to apply these settings across the entire title - (ex "My Awesome Site" )

Yes, that would be the majority of the use case. I think a simple checkbox that defaults to be a link to the homepage would be a good start. (potentially allowing a custom URL if we hear many requests)

--

I've been waiting for a letter-spacing control for some time #20796. Is it possible to start with the Site Title block, and eventually the setting to be ported to other blocks?

@apeatling
Copy link
Contributor

apeatling commented Sep 8, 2020

Font size and line height should be in place now. Letter spacing and uppercase should be achievable using CSS classes and styles. Getting rich text to work on the site title is going to be a whole different conversation.

@apeatling
Copy link
Contributor

I do think that letter spacing and uppercase transforms could be generalized and apply to any block as part of font settings.

@alaczek
Copy link
Author

alaczek commented Sep 11, 2020

Letter spacing and uppercase should be achievable using CSS classes and styles

Would this be theme dependent, or are there universal classes in Gutenberg we could start applying now?

@shaunandrews
Copy link
Contributor

I believe most of the requests here are (and will be) solved as the Global Styles project progress: #25139

The foundation is there, and @noahshrader is working on extending the design to support line-height, letter-spacing, font-family, font-size, and maybe even letter case. I spent a little time exploring one-off solutions to support line-height for the Site Title block, but Noah has already eclipsed my thinking — he's way ahead of me — and I wouldn't want to spend too much time creating solutions that might not make sense in the larger context of Global Styles.

Maybe there's a way we can all work towards improving the early stage Global Styles project? Would it make sense to start by creating a line-height control specific to Site Title, and then pushing to expand it elsewhere?

@iamtakashi
Copy link

I'm not fully up to date on the progress on Global Styles project, but would it allow, for example, a custom letter-spacing specifically for the site title block?

We see often site title and section headings are styled differently from the headings in the content of a post/ page.

@shaunandrews
Copy link
Contributor

I'm not fully up to date on the progress on Global Styles project, but would it allow, for example, a custom letter-spacing specifically for the site title block?

Yup, you'll have block-level controls. Here's how it works right now:

global-styles-current

@iamtakashi
Copy link

iamtakashi commented Sep 16, 2020

Thanks for the info! But, I still feel that it would be valuable to have the setting in the block from the pattern creation point of view. Like the examples at the top of this issue, I can imagine various header patterns having unique settings around letter-spacing or letter-casing to express different visual expressions.

I'm likely missing something obvious, but in my understanding, patterns should be able to override the style provided by Global Styles or theme in each pattern if necessary... right?

@ianstewart
Copy link
Contributor

It would be useful to extend Letter case controls introduced in #26060 to the Site Title Block as well.

@ianstewart
Copy link
Contributor

ianstewart commented Jan 11, 2021

Made a discrete issue for the above letter case controls issue. #28106

@priethor
Copy link
Contributor

priethor commented Apr 16, 2021

As a status update of this issue as of Gutenberg 10.4, half of the ideas proposed above are already implemented:

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@youknowriad
Copy link
Contributor

I've just checked and all of the options are available now for the site title block including the "font weight and style" (appearance) and the letter spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Site Title Affects the Site Title Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")
Projects
None yet
Development

No branches or pull requests

10 participants