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

Why are widgets' margin and padding styled here? #3419

Closed
Reinmar opened this issue Nov 6, 2018 · 4 comments · Fixed by ckeditor/ckeditor5-theme-lark#210
Closed

Why are widgets' margin and padding styled here? #3419

Reinmar opened this issue Nov 6, 2018 · 4 comments · Fixed by ckeditor/ckeditor5-theme-lark#210
Assignees

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 6, 2018

https://github.com/ckeditor/ckeditor5-theme-lark/blob/41d7d1e0eeae5517ef605bf6cd0e2977249d7d14/theme/ckeditor5-widget/widget.css#L22-L23

This is odd. Widgets system is a generic system and should not assume anything beyond how widgets react to selection/focus/etc.

I stumbled upon this because every time I wanted to write a "simple box"-like widget, I had to fight with the specificity of these styles.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 6, 2018

cc @dkonopka @oleq

@oleq
Copy link
Member

oleq commented Nov 6, 2018

Just to be clear: do you want these styles removed or moved to some other place?

@Reinmar
Copy link
Member Author

Reinmar commented Nov 6, 2018

If they are needed, they should be applied by specific widgets (that need them).

Although, I'm really curious which features really need them in the first place. That will answer the question whether it makes sense if they are generalised like that.

@oleq
Copy link
Member

oleq commented Nov 16, 2018

I wasn't able to determine why we need padding: 0 (blame is too old) so I removed it. Maybe it will come out during the review.

As for the margin, I moved this style to image and media-embed and aligned to the table (which already has it).

@oleq oleq self-assigned this Nov 16, 2018
dkonopka referenced this issue in ckeditor/ckeditor5-theme-lark Nov 19, 2018
Other: Moved widget spacing styles to respective content styles in packages. Closes #209.
dkonopka referenced this issue in ckeditor/ckeditor5-image Nov 19, 2018
Other: Moved widget spacing styles from ckeditor5-theme-lark to the feature content styles sheet (see ckeditor/ckeditor5-theme-lark#209).
dkonopka referenced this issue in ckeditor/ckeditor5-media-embed Nov 19, 2018
Other: Moved widget spacing styles from ckeditor5-theme-lark to the feature content styles sheet (see ckeditor/ckeditor5-theme-lark#209).
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-theme-lark Oct 9, 2019
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

Successfully merging a pull request may close this issue.

2 participants