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

A single paragraph is not centred in the editor #847

Closed
Reinmar opened this issue Feb 14, 2018 · 4 comments
Closed

A single paragraph is not centred in the editor #847

Reinmar opened this issue Feb 14, 2018 · 4 comments
Assignees
Labels
package:theme-lark type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Feb 14, 2018

CKEditor doesn't set the typography of its content but I remember that some time ago it was ok – a single paragraph was well centred (vertically) within an editable. Why did it change?

image

@Reinmar Reinmar added this to the iteration 14 milestone Feb 14, 2018
@oleq
Copy link
Member

oleq commented Feb 16, 2018

It's an aftermath of ckeditor/ckeditor5-theme-lark@d717139. Because there are situations where the paragraphs have no top margin (like nightly docs), we simply hardcoded it for the first p (by default editable has no vertical padding).

TBH, I'm not sure how to deal with that...

@Reinmar
Copy link
Member Author

Reinmar commented Feb 16, 2018

Can't we add the same CSS rule for the last child?

@oleq
Copy link
Member

oleq commented Feb 16, 2018

You mean some symmetrical bottom margin of the last child to that top margin of the first child?

@Reinmar
Copy link
Member Author

Reinmar commented Feb 16, 2018

This, to be precise:

 +	& > *:last-child {
 +		margin-bottom: var(--ck-spacing-standard);
 +	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:theme-lark type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants