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

[Styles dropdown] Implement the UI #11269

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

[Styles dropdown] Implement the UI #11269

Reinmar opened this issue Feb 14, 2022 · 4 comments
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@Reinmar
Copy link
Member

Reinmar commented Feb 14, 2022

Why

Implementation needed for #5700.

What

Based on #11267. Implement the UI layer of the feature.

Scope:

  • Basic UI implementation of the dropdown with a list of styles
  • With basic a11y
  • Without researching safe styles previews (how to generate previews of defined styles in a way that e.g. a super large heading breaks the preview container)
@Reinmar Reinmar added type:task This issue reports a chore (non-production change) and other types of "todos". domain:ui/ux This issue reports a problem related to UI or UX. squad:core Issue to be handled by the Core team. labels Feb 14, 2022
@Reinmar
Copy link
Member Author

Reinmar commented Feb 16, 2022

Problem that we encountered: How to apply .ck-content SELECTOR {} styles inside the preview slots in the dropdown.

These styles have lower specificity than .ck.ck-reset_all * {} which we use in the UI too.

We were thinking about:

  • Changing the reset selector to .ck.ck-reset_all :not(.some-class-to-abort) {} and using .some-class-to-abort in the preview boxes. However, this rises the specificity of the reset rules and is a heavy breaking change
  • Forcing people to rise the specificity of their .ck-content * styles.

The only feasible way for now is the second approach.

@Reinmar
Copy link
Member Author

Reinmar commented Feb 16, 2022

When generating previews of styles, we need to generate their markups. However, a style for <td> is pretty tricky to showcase. Hence, for all these kinds of intermediate elements, we will use a <div> instead.

When writing CSS for these elements people will need to:

  • write the default styles via .ck.ck-content td.some-style {}
  • and additionally style .ck.ck-content.ck-style-grid__button__preview div.some-style {}

@Reinmar Reinmar added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Feb 21, 2022
dawidurbanski added a commit that referenced this issue Feb 28, 2022
Feature (style): Implemented the UI of the styles dropdown. Closes #11269.
@oleq
Copy link
Member

oleq commented Feb 28, 2022

Closed in #11293.

@oleq oleq closed this as completed Feb 28, 2022
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Feb 28, 2022
@Reinmar Reinmar added this to the upcoming milestone Mar 1, 2022
@Reinmar Reinmar modified the milestones: upcoming, iteration 52 Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

4 participants