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

[E] avoiding unnecessary handling of extra space at comment start #2029

Closed
githubertus opened this issue Nov 10, 2021 · 4 comments
Closed

[E] avoiding unnecessary handling of extra space at comment start #2029

githubertus opened this issue Nov 10, 2021 · 4 comments

Comments

@githubertus
Copy link
Contributor

githubertus commented Nov 10, 2021

on a fresh page load a comment looks like this:
comment-loaded
after editing and saving that comment it looks like
comment-edited
A hardly noticable difference at first sight, but actually lines 53, 55, 57 of OssnComments/plugins/default/comments/templates/comment.php are adding that extra space in the beginning on load, while after XHR editing and saving this leading space gets lost due to libinput trimming.

Unfortunately, this isn't just a 'cosmetic glitch', because the comment's real string length becomes part of a calculation when running the ReadMore component. So my former workaround was overwriting the comments original embed action and adding that lost space again.
But I'm not really happy with overwriting core stuff if it's not absolutely necessary and I would like to get rid of that.

So my idea (in case you want that little more distance between user name and the comment's text start) is to remove that space from line 53, 55 and 57 and add a margin-left of 5px to the 'comment-text' class instead.

@lianglee
Copy link
Member

Totally agree with you, it must be a css instead of that hardcode space. Fixing it tonight :)

@lianglee
Copy link
Member

We even don't need css as its covered by .comment-contents .owner-link

image

@lianglee
Copy link
Member

Fixed closing issue.

@githubertus
Copy link
Contributor Author

Thx. 👍

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