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

List item inline style fix #68732

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

rinkalpagdar
Copy link
Contributor

Fixes #68727

What?

This PR resolves conflict with the default style added for content

Why?

When we register style via register_block_style for list-item it gets conflicted with the default style mentioned in content.scss
We can either remove the default style or reduce the priority or else we can provide !important to our inline style. So it will have more preference.

How?

I have removed the default style causing conflicts.

Testing Instructions

  1. Add an inline or inline-block pseudo ::after element via CSS to a core/list-item.
\register_block_style( 
    'core/list-item' , 
    array(
        'default'      => false,
        'name'         => 'acme-list',
        'lable'         => 'ACME List',
        'inline_style' => '.is-style-acme-list { position: relative; } .is-style-acme-list::after { content: "This is a fancy orange box."; background-color: #ffba10; } '
    )
);

Copy link

github-actions bot commented Jan 17, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: rinkalpagdar <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: djcowan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka
Copy link
Member

@rinkalpagdar, it looks like @singhakanshu00 is already working on the solution - #68731.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Block] List Affects the List Block labels Jan 17, 2025
@rinkalpagdar
Copy link
Contributor Author

@rinkalpagdar, it looks like @singhakanshu00 is already working on the solution - #68731.

@Mamaduka When I started working on the issue. I noticed that no PR or comment were submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list-item inline pseudo ::after element renders incorrectly in the editor
2 participants