Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

i/6553: Replace .ck-labeled-input and .ck-labeled-view classes with .ck-label-field-view #276

Merged
merged 3 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion theme/ckeditor5-image/textalternativeform.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
padding: 0;
width: calc(.8 * var(--ck-input-text-width));

& .ck-labeled-input {
& .ck-labeled-field-view {
margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;

& .ck-input-text {
Expand Down
5 changes: 2 additions & 3 deletions theme/ckeditor5-link/linkform.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
padding: 0;
width: calc(.8 * var(--ck-input-text-width));

& .ck-labeled-input {
& .ck-labeled-field-view {
margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;

& .ck-input-text {
Expand Down Expand Up @@ -74,7 +74,7 @@
padding: 0;
min-width: var(--ck-input-text-width);

& .ck-labeled-input {
& .ck-labeled-field-view {
margin: var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small);

& .ck-input-text {
Expand Down Expand Up @@ -122,4 +122,3 @@
}
}
}

4 changes: 2 additions & 2 deletions theme/ckeditor5-media-embed/mediaform.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
padding: 0;
width: calc(.8 * var(--ck-input-text-width));

& .ck-labeled-input {
& .ck-labeled-field-view {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something's wrong with the media form

image

and when I remove this rule it goes back to normal:

image

but I see that all forms (link, text alternative) have this style and it works.


Anyway, it is caused by the status text which does not wrap to the next line and removing it "fixes" the problem

image

image

Why it worked before?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also lost all the colors and font size in the status:

Expected:
image

Actual:

image


It could be that because the font was smaller, issues I mentioned in my previous comment were never visible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same in the table props dialog, font size is wrong

image

margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;

& .ck-input-text {
Expand All @@ -38,7 +38,7 @@
}

/* Let the long error messages wrap in the narrow form. */
& .ck-labeled-input__error {
& .ck-labeled-field-view__error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it also work for non-error statuses?

image

white-space: normal;
}
}
Expand Down
10 changes: 5 additions & 5 deletions theme/ckeditor5-table/tableform.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.ck.ck-table-form {
& .ck-form__row {
&.ck-table-form__border-row {
& .ck-labeled-view {
& .ck-labeled-field-view {
& > .ck-label {
font-size: var(--ck-font-size-tiny);
text-align: center;
Expand All @@ -34,7 +34,7 @@
&.ck-table-form__dimensions-row {
padding: 0;

& .ck-labeled-view > .ck-label {
& .ck-labeled-field-view > .ck-label {
font-size: 10px;
text-align: center;
}
Expand All @@ -54,8 +54,8 @@
}
}

& .ck.ck-labeled-view {
& .ck.ck-labeled-view__status {
& .ck.ck-labeled-field-view {
& .ck.ck-labeled-field-view__status {
@mixin ck-rounded-corners;

background: var(--ck-color-base-error);
Expand All @@ -75,7 +75,7 @@
}

/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */
& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-view__status {
& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

.ck.ck-labeled-view .ck-labeled-view__status {
.ck.ck-labeled-field-view .ck-labeled-field-view__status {
font-size: var(--ck-font-size-small);
margin-top: var(--ck-spacing-small);

Expand All @@ -12,11 +12,11 @@
white-space: normal;
}

.ck.ck-labeled-view .ck-labeled-view__status_error {
.ck.ck-labeled-field-view .ck-labeled-field-view__status_error {
color: var(--ck-color-base-error);
}

.ck.ck-labeled-view > .ck.ck-label {
.ck.ck-labeled-field-view > .ck.ck-label {
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
Expand Down