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

TT1 Blocks: Latest Comments Block: Migrate CSS to theme.json #122

Open
scruffian opened this issue Dec 9, 2020 · 6 comments
Open

TT1 Blocks: Latest Comments Block: Migrate CSS to theme.json #122

scruffian opened this issue Dec 9, 2020 · 6 comments

Comments

@scruffian
Copy link
Collaborator

scruffian commented Dec 9, 2020

The code is here.

From #82

An example of the state of the comments block can be found here: https://2021blocks.wordpress.net/comment-block/

The latest-comments block will need to support configurable padding. This Gutenberg issue has been opened to track that.

@pbking
Copy link
Collaborator

pbking commented Dec 14, 2020

There is a fair bit of block-specific styling that I'm unsure how can/will be supported by Global Styles:

.wp-block-latest-comments .wp-block-latest-comments__comment {
.wp-block-latest-comments .wp-block-latest-comments__comment-meta {
.wp-block-latest-comments .wp-block-latest-comments__comment-date {
.wp-block-latest-comments .wp-block-latest-comments__comment-excerpt p {

These selectors from the original TT1 theme outlined specific font-sizes.

There's also some first/last child padding constraints as well.

These are all details that MIGHT be configurable and defined in the JSON or it might just be expressed in CSS as specifics to the theme. I'm unsure what is correct here.

@kjellr
Copy link
Collaborator

kjellr commented Dec 14, 2020

There is a fair bit of block-specific styling that I'm unsure how can/will be supported by Global Styles:

My general thought here is "wait and see". 😄

Eventually, I do expect that the comments block will be made up of a series of child blocks, and we'll be able to move and adjust them as we can with things inside of a Query block today. But in the near term, I not sure that it makes a lot of sense to focus on implementing any of these as stopgaps.

@pbking pbking removed their assignment Dec 14, 2020
@pbking
Copy link
Collaborator

pbking commented Dec 14, 2020

Indeed, that sounds the best way to be able to be able to express those.

Is there an example of how child-blocks can be styled when within a parent block? I'm wondering what the theme.json would look like when trying to express these choices as the defaults for the theme. How does one configure the style of a child block for a particular block?

@kjellr
Copy link
Collaborator

kjellr commented Dec 15, 2020

I don't think there's an example like that yet — I think the closest example would be the Navigation block, where it only accepts a slim range of special innerblocks. But that doesn't include any special innerblock styling options yet.

@scruffian
Copy link
Collaborator Author

Would we need to specify how child blocks are styled when inside a child block, or would it be sufficient to simply define defaults for these blocks?

@kjellr
Copy link
Collaborator

kjellr commented Dec 15, 2020

I imagine just defaults for those blocks. But some blocks only live within other blocks (for example, the "Column" block can only live within the "Columns" block), so I'm not sure how those fit into global styles exactly.

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

3 participants