theme-experiments
theme-experiments copied to clipboard
Migrate styles from List Block
trafficstars
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: https://github.com/WordPress/gutenberg/pull/27511 https://github.com/WordPress/gutenberg/pull/27510
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;
}
All those notes sound right to me, @scruffian. 👍