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: Migrate CSS for code block #94

Closed
scruffian opened this issue Nov 25, 2020 · 1 comment · Fixed by WordPress/gutenberg#27582 or #113
Closed

TT1 Blocks: Migrate CSS for code block #94

scruffian opened this issue Nov 25, 2020 · 1 comment · Fixed by WordPress/gutenberg#27582 or #113
Assignees
Labels
block-based theme A theme using HTML templates

Comments

@scruffian
Copy link
Collaborator

scruffian commented Nov 25, 2020

Broken out of #82

The code is:

.wp-block-code {
	border-color: var(--global--color-border);
	border-radius: 0;
	border-style: solid;
	border-width: 0.1rem;
	padding: var(--global--spacing-unit);

	code {
		font-size: var(--global--font-size-xs);
		white-space: pre;
		overflow-x: auto;
		display: block;
	}
}
  • The border settings will need to be added to Global Styles.
  • IMO the white space and overflow settings can be removed to just use the ones that the block has
  • display block should probably be added to the block too
  • a padding control should also be added to the block
@pbking
Copy link
Collaborator

pbking commented Dec 9, 2020

Padding control has been added (see linked Gutenberg PR).
Font Size and default padding have been added to theme.json

BORDER is another matter... there's a WIP that is adding border RADIUS but in the way that the rest of border will follow; That code needs to land before we can make the CODE's border customizable.
I'm unsure what the timeline for that might be so I've supplied CSS to style the border as was done in TT1. Not sure if that will stay in.

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
2 participants