Skip to content

Commit

Permalink
Removed the CSS "nest" at-rule as it is no longer valid PostCSS selec…
Browse files Browse the repository at this point in the history
…tor.
  • Loading branch information
pomek committed Sep 23, 2024
1 parent c177fa7 commit 1f935eb
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/ckeditor5-list/theme/todolist.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
margin-left: 0;

/* RTL styles */
@nest [dir=rtl]& {
[dir=rtl]& {
left: 0;
margin-right: 0;
right: -25px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
margin-left: 50px;
}

@nest .ck.ck-editor__editable.ck-blurred &.ck-widget_selected::before {
.ck.ck-editor__editable.ck-blurred &.ck-widget_selected::before {
top: 0px;
padding: var(--ck-spacing-tiny) var(--ck-spacing-small);
}

@nest .ck.ck-editor__editable:not(.ck-blurred) &.ck-widget_selected::before {
.ck.ck-editor__editable:not(.ck-blurred) &.ck-widget_selected::before {
top: 0;
padding: var(--ck-spacing-tiny) var(--ck-spacing-small);
background: var(--ck-color-focus-border);
}

@nest .ck.ck-editor__editable &:not(.ck-widget_selected):hover::before {
.ck.ck-editor__editable &:not(.ck-widget_selected):hover::before {
top: 0px;
padding: var(--ck-spacing-tiny) var(--ck-spacing-small);
}
Expand Down Expand Up @@ -135,7 +135,7 @@
width: var(--ck-html-embed-content-width);

/* Disable all mouse interaction as long as the editor is not read–only. */
@nest .ck-editor__editable:not(.ck-read-only) & {
.ck-editor__editable:not(.ck-read-only) & {
pointer-events: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
&:hover > .ck-splitbutton__action,
&.ck-splitbutton_open > .ck-splitbutton__action {
@nest [dir="ltr"] & {
[dir="ltr"] & {
/* Don't round the action button on the right side */
border-top-right-radius: unset;
border-bottom-right-radius: unset;
}

@nest [dir="rtl"] & {
[dir="rtl"] & {
/* Don't round the action button on the left side */
border-top-left-radius: unset;
border-bottom-left-radius: unset;
Expand All @@ -34,13 +34,13 @@
it must get some arbitrary min-width. */
min-width: unset;

@nest [dir="ltr"] & {
[dir="ltr"] & {
/* Don't round the arrow button on the left side */
border-top-left-radius: unset;
border-bottom-left-radius: unset;
}

@nest [dir="rtl"] & {
[dir="rtl"] & {
/* Don't round the arrow button on the right side */
border-top-right-radius: unset;
border-bottom-right-radius: unset;
Expand All @@ -58,6 +58,20 @@
border-bottom-width: 0px;
}

/* Don't round the bottom left and right corners of the buttons when "open"

This comment has been minimized.

Copy link
@pomek

pomek Sep 23, 2024

Author Member

This change is due to a linter error.

packages/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css
 101:2  ✖  Expected selector ".ck.ck-splitbutton.ck-splitbutton_open" to come before selector "[dir="ltr"] .ck.ck-splitbutton.ck-splitbutton_open"   no-descending-specificity
 101:2  ✖  Expected selector ".ck.ck-splitbutton.ck-splitbutton_open" to come before selector "[dir="rtl"] .ck.ck-splitbutton.ck-splitbutton_open"   no-descending-specificity
https://github.com/ckeditor/ckeditor5/issues/816 */
&.ck-splitbutton_open {
@mixin ck-rounded-corners {
& > .ck-splitbutton__action {
border-bottom-left-radius: 0;
}

& > .ck-splitbutton__arrow {
border-bottom-right-radius: 0;
}
}
}

/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling
as a whole. The background of both buttons should stand out and there should be a visual
separation between both buttons. */
Expand All @@ -83,30 +97,16 @@
--ck-color-split-button-hover-border: var(--ck-color-focus-border);
}

@nest [dir="ltr"] & {
[dir="ltr"] & {
& > .ck-splitbutton__arrow:not(.ck-disabled)::after {
left: -1px;
}
}

@nest [dir="rtl"] & {
[dir="rtl"] & {
& > .ck-splitbutton__arrow:not(.ck-disabled)::after {
right: -1px;
}
}
}

/* Don't round the bottom left and right corners of the buttons when "open"
https://github.com/ckeditor/ckeditor5/issues/816 */
&.ck-splitbutton_open {
@mixin ck-rounded-corners {
& > .ck-splitbutton__action {
border-bottom-left-radius: 0;
}

& > .ck-splitbutton__arrow {
border-bottom-right-radius: 0;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
outline: none;
}

@nest .ck-toolbar-container & {
.ck-toolbar-container & {
border: 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-theme-lark/theme/mixins/_rounded.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@define-mixin ck-rounded-corners {
border-radius: 0;

@nest .ck-rounded-corners &,
.ck-rounded-corners &,
&.ck-rounded-corners {
border-radius: var(--ck-border-radius);
@mixin-content;
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-ui/theme/components/dialog/dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
}

@nest .ck.ck-dialog-overlay.ck-dialog-overlay__transparent & {
.ck.ck-dialog-overlay.ck-dialog-overlay__transparent & {
pointer-events: all;
}
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-ui/theme/mixins/_dir.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

@define-mixin ck-dir $direction {
@nest [dir="$(direction)"] & {
[dir="$(direction)"] & {
@mixin-content;
}
}

0 comments on commit 1f935eb

Please sign in to comment.