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

Migrate CSS for Code block for TT1-block theme #113

Merged
merged 3 commits into from
May 12, 2021
Merged

Conversation

pbking
Copy link
Collaborator

@pbking pbking commented Dec 8, 2020

Change to support: #94

Reference [TwentyTwentyOne's styles](As expressed by TT1's CODE block styles: https://github.com/WordPress/twentytwentyone/blob/trunk/assets/sass/05-blocks/code/_style.scss) for design target.

image

  • Supply default padding values for CODE block
  • Supply default font size attribute to code block
  • Supply default boarder attributes to code block

Note: There were previously dependencies on changes to Gutenberg to allow some of these changes. The actual changes made were different from the original dependencies but the result was the same.

@pbking pbking marked this pull request as draft December 8, 2020 16:28
@pbking pbking linked an issue Dec 8, 2020 that may be closed by this pull request
@pbking pbking marked this pull request as ready for review December 8, 2020 21:15
@pbking pbking added the block-based theme A theme using HTML templates label Dec 8, 2020
@pbking pbking self-assigned this Dec 10, 2020
@carolinan
Copy link
Collaborator

carolinan commented Dec 14, 2020

There is a problem with the text color of the code block, in Twenty Twenty-One, it is being overwritten by the block editor styles.
It would be useful to be able to set the text color.
Probably a lot more useful than being able to set both padding and border radius.

Trac ticket:
https://core.trac.wordpress.org/ticket/51985

@scruffian
Copy link
Collaborator

As @carolinan suggested we should be able to add support for custom colors to this block like we have for others.

My preference would be to not ship the CSS for borders in the PR but wait for support to be added to Gutenberg.

@pbking pbking marked this pull request as draft December 16, 2020 21:59
@pbking pbking force-pushed the migrate/code branch 2 times, most recently from b06c63c to 12c89c3 Compare December 17, 2020 21:57
@pbking
Copy link
Collaborator Author

pbking commented Feb 16, 2021

This has been updated to depend completely on Global Styles for border styling. With this (and its dependent change) the code block for TT1-blocks reaches feature parity with TwentyTwentyOne.

image

@pbking pbking marked this pull request as ready for review February 16, 2021 16:02
Supplied typeography, padding and border style values for code block
style defaults
@carolinan
Copy link
Collaborator

carolinan commented May 12, 2021

I removed the font size because in the current Twenty Twenty-One the default size of 20px is used.

@carolinan carolinan merged commit 3992540 into master May 12, 2021
@carolinan carolinan deleted the migrate/code branch May 12, 2021 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-based theme A theme using HTML templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TT1 Blocks: Migrate CSS for code block
3 participants