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

Setting a custom css class on dropdownview #5488

Closed
lucasreppewelander opened this issue Oct 7, 2018 · 3 comments · Fixed by ckeditor/ckeditor5-ui#448
Closed

Setting a custom css class on dropdownview #5488

lucasreppewelander opened this issue Oct 7, 2018 · 3 comments · Fixed by ckeditor/ckeditor5-ui#448
Assignees
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@lucasreppewelander
Copy link

Hi, I cant really find that it is possible to set a custom css class to the dropdown view today. or am I wrong?

@lucasreppewelander lucasreppewelander changed the title setting a class on dropdownview Setting a custom css class on dropdownview Oct 7, 2018
@oleq
Copy link
Member

oleq commented Oct 8, 2018

You're right, we don't have an option to set a CSS class on the DropdownView (as a whole) yet. You can add a custom class to the dropdown's button, though. Use the dropdownView.buttonView.class property.

If you feel like our code could be better and want to contribute, check out the contributors guide explaining where to start and how to make a pull request.

@lucasreppewelander
Copy link
Author

lucasreppewelander commented Oct 8, 2018

Yes, I saw that, but in my case I actually need to style the DropdownPanelView which does not have the ability to set the class too. And with the fact that you can't select a parent with pure css I think that this needs to be handled by the DropdownView

so I felt that setting the class on the DropdownView is more convenient especially in a plugin where you do things to the dropdownview anyway, like binds and such.

@oleq oleq self-assigned this Oct 10, 2018
oleq referenced this issue in ckeditor/ckeditor5-ui Oct 10, 2018
Feature: Added the optional `DropdownView#class` property to set a custom CSS class on the main element in DOM. Closes #447.

Thanks to [@lucasreppewelander](https://github.com/lucasreppewelander)!
@oleq
Copy link
Member

oleq commented Oct 10, 2018

Big thanks for your contribution @lucasreppewelander!

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 21 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants