From 36945564f7d6d3b09567270bc75dd4583b1e2c48 Mon Sep 17 00:00:00 2001 From: Aadil Ayub Date: Tue, 29 Aug 2023 17:21:08 +0500 Subject: [PATCH] create arrow list block style --- block-styles.css | 5 +++++ js/block-styles.js | 7 +++++++ style.css | 4 ---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/block-styles.css b/block-styles.css index 7d80ee1..0c3fb09 100644 --- a/block-styles.css +++ b/block-styles.css @@ -48,4 +48,9 @@ margin-top: 4em; font-size: var(--wp--preset--font-size--medium); } +} + +/* For "Arrow" style lists */ +ul.is-style-arrow-list { + list-style-image: url('https://beta.autonomic.zone/wp-content/uploads/2023/01/arrow.png'); } \ No newline at end of file diff --git a/js/block-styles.js b/js/block-styles.js index bacfd08..5956872 100644 --- a/js/block-styles.js +++ b/js/block-styles.js @@ -26,4 +26,11 @@ wp.domReady( () => { label: 'Markdown-style Heading', } ) + + wp.blocks.registerBlockStyle( + 'core/list', { + name: 'arrow-list', + label: 'Arrows', + } + ) } ) \ No newline at end of file diff --git a/style.css b/style.css index 410ca86..4638e63 100644 --- a/style.css +++ b/style.css @@ -35,10 +35,6 @@ html, body { .wp-site-blocks h2::before { width: 7ch; } -} - -.home .wp-site-blocks ul { - list-style-image: url('https://beta.autonomic.zone/wp-content/uploads/2023/01/arrow.png'); } .home .wp-site-blocks h2 {