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 styles from List Block #111

Open
scruffian opened this issue Dec 4, 2020 · 2 comments
Open

Migrate styles from List Block #111

scruffian opened this issue Dec 4, 2020 · 2 comments
Assignees

Comments

@scruffian
Copy link
Collaborator

scruffian commented Dec 4, 2020

From #82

The rules are:
styles.scss:


ul,
ol {
	font-family: var(--list--font-family);
	margin: 0;
	padding-left: calc(2 * var(--global--spacing-horizontal));

	// Utility classes
	&.aligncenter {
		list-style-position: inside;
		padding: 0;
	}

	&.alignright {
		list-style-position: inside;
		text-align: right;
		padding: 0;
	}
}

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

dt {
	font-family: var(--definition-term--font-family);
	font-weight: bold;
}

dd {
	margin: 0;
	padding-left: calc(2 * var(--global--spacing-horizontal));
}

editor.scss:

ul,
ol {
	font-family: var(--list--font-family);
	margin: var(--global--spacing-vertical) 0;
	padding-left: calc(2 * var(--global--spacing-horizontal));

	// Utility classes
	&.aligncenter {
		list-style-position: inside;
		padding: 0;
		text-align: center;
	}

	&.alignright {
		list-style-position: inside;
		padding: 0;
		text-align: right;
	}
}

li {

	> ul,
	> ol {
		margin: 0;
	}
}

dt {
	font-family: var(--definition-term--font-family);
	font-weight: bold;
}

I have opened a couple of Gutenberg PRs for this:
WordPress/gutenberg#27511
WordPress/gutenberg#27510

@scruffian
Copy link
Collaborator Author

There's a few rules here that I don't see the need for.

The alignment rules don't seem necessary, since the list block doesn't support alignments.
The dt and dd rules also seem unrelated to this block, since it doesn't support this markup.

These rules aren't needed as they are the browser default:

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

@kjellr
Copy link
Collaborator

kjellr commented Dec 16, 2020

All those notes sound right to me, @scruffian. 👍

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

2 participants