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

Latest Posts block date change position when we add extra class. #12700

Closed
mukeshpanchal27 opened this issue Dec 8, 2018 · 1 comment · Fixed by #12725
Closed

Latest Posts block date change position when we add extra class. #12700

mukeshpanchal27 opened this issue Dec 8, 2018 · 1 comment · Fixed by #12725
Labels
[Block] Latest Posts Affects the Latest Posts Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended

Comments

@mukeshpanchal27
Copy link
Member

Describe the bug
When anyone add an extra class in Additional CSS Class date position change in Latest Posts block.

  • WordPress 5.0
  • Twenty Nineteen 1.0

To Reproduce
Steps to reproduce the behaviour:

  1. Add a Latest Posts block.
  2. Add an extra class in Additional CSS Class box
  3. See error

Expected behavior
Do not change data position in editor.

Screenshots

latest-post-issue

Desktop (please complete the following information):

  • OS: Ubuntu 16.04 LTS
  • Browser Google Chrome
  • Version 69.0.3497.81 (64-bit)

Additional context

  • When we add an extra class that class also place in tage class then needs to remove then it will fix above issue.
@swissspidy swissspidy added Needs Testing Needs further testing to be confirmed. [Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended Good First Issue An issue that's suitable for someone looking to contribute for the first time and removed Needs Testing Needs further testing to be confirmed. labels Dec 8, 2018
@swissspidy
Copy link
Member

By default the class of the <time> element is wp-block-latest-posts__post-date. That's the class that's styled in the CSS.

However. if I add a custom class foo, the class will be wp-block-latest-posts foo__post-date. That's because the parent <ul> class is changed to wp-block-latest-posts foo has-dates and it's just copied for <time>.

I don't think the class of the <time> should be changed when adding a custom class, because the class is already added to the parent <ul>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants