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

Setting some base CSS values and variables #47

Open
justintadlock opened this issue Sep 19, 2018 · 0 comments
Open

Setting some base CSS values and variables #47

justintadlock opened this issue Sep 19, 2018 · 0 comments
Labels
Component: Styles Help Wanted Extra attention is needed.

Comments

@justintadlock
Copy link
Member

justintadlock commented Sep 19, 2018

Because we decided that adding baseline Gutenberg styles into theme was a good idea, we also need to take care of some baseline width, margin, padding, size, and similar values.

For example, take this code from resources/scss/blocks/core/_cover-image.scss:

.wp-block-cover-image-text {
	color:         color( white );
	font-size:     2em;
	line-height:   1.25;
	z-index:       1;
	margin-bottom: 0;
	max-width:     content-width();
	padding:       14px;
	text-align:    center;

	a,
	a:hover,
	a:focus,
	a:active {
		color: color( white );
	}
}

As you can see, the content-width() function will return the theme's content width. However, we should take that further and allow theme authors to plug in other numeric values in /resources/scss/settings. The font-size, line-height and padding values from above could all be replaced with settings.

To do this, we'd need to identify all the places that could use such treatment and establish some standards on how to best handle that.

We could even explore existing packages/libraries that are out there.

@justintadlock justintadlock added Help Wanted Extra attention is needed. Component: Styles labels Sep 19, 2018
@justintadlock justintadlock added this to the 1.1.0 milestone Sep 19, 2018
@justintadlock justintadlock removed this from the 1.1.0 milestone Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Styles Help Wanted Extra attention is needed.
Projects
None yet
Development

No branches or pull requests

1 participant