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

Commit

Permalink
Merge pull request #265 from ckeditor/i/6131
Browse files Browse the repository at this point in the history
Feature: Added styles for rich error messages in the table and table cell properties forms (see ckeditor/ckeditor5#6131).
  • Loading branch information
jodator authored Feb 10, 2020
2 parents c2bf945 + c5d362f commit f859f4b
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions theme/ckeditor5-table/tableform.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,73 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

@import "../mixins/_rounded.css";

:root {
--ck-table-properties-error-arrow-size: 6px;
--ck-table-properties-min-error-width: 150px;
}

.ck.ck-table-form {
& .ck-table-form__border-row {
& .ck-labeled-view {
& > .ck-label {
font-size: var(--ck-font-size-tiny);
}
}

& .ck-table-form__border-style {
width: 80px;
min-width: 80px;
}

& .ck-table-form__border-width {
width: 80px;
min-width: 80px;
}
}

& .ck-table-form__dimension-operator {
margin: 0;
align-self: start;
display: inline-block;
height: var(--ck-ui-component-min-height);
line-height: var(--ck-ui-component-min-height);
}

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

background: var(--ck-color-base-error);
color: var(--ck-color-base-background);
padding: var(--ck-spacing-small) var(--ck-spacing-medium);
min-width: var(--ck-table-properties-min-error-width);
text-align: center;

/* The arrow pointing towards the field. */
&::after {
border-color: transparent transparent var(--ck-color-base-error) transparent;
border-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);
border-style: solid;
}

animation: ck-table-form-labeled-view-status-appear .15s ease both;
}

/* 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 {
display: none;
}
}
}

@keyframes ck-table-form-labeled-view-status-appear {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

0 comments on commit f859f4b

Please sign in to comment.