Skip to content

Commit

Permalink
fix: importing theme in a class creates a wrong selector
Browse files Browse the repository at this point in the history
  • Loading branch information
inikolova committed Aug 23, 2024
1 parent a3670ac commit 165ec66
Show file tree
Hide file tree
Showing 48 changed files with 426 additions and 449 deletions.
8 changes: 2 additions & 6 deletions packages/bootstrap/scss/menu/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
padding-inline: 0;
}

.k-menu-group,
.k-menu-vertical {

.k-menu-popup & {
padding: 0;
}
.k-menu-popup :is(.k-menu-group, .k-menu-vertical) {
padding: 0;
}

.k-context-menu-popup {
Expand Down
12 changes: 8 additions & 4 deletions packages/bootstrap/scss/scheduler/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
&::before {
display: none;
left: 0;

.k-rtl & {
right: 0;
}
}

// Angular fix for stronger selector and smaller padding
Expand All @@ -35,4 +31,12 @@
}
}

.k-rtl {
kendo-scheduler .k-event,
.k-event {
&::before {
right: 0;
}
}
}
}
27 changes: 11 additions & 16 deletions packages/default/scss/adaptive/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -454,28 +454,23 @@
}

}
}

// RTL
.k-rtl &,
&[dir="rtl"],
[dir="rtl"] & {

.k-scheduler-mobile {

.k-scheduler-toolbar {
> ul > li {
border: 0;
}
// RTL
:is(.k-rtl .k-pane-wrapper, [dir="rtl"] .k-pane-wrapper, .k-pane-wrapper[dir="rtl"]) {
.k-scheduler-mobile {
.k-scheduler-toolbar {
> ul > li {
border: 0;
}
}

.k-task .k-i-reload {
margin-left: .5em;
margin-right: 0;
}
.k-task .k-i-reload {
margin-left: .5em;
margin-right: 0;
}
}
}

}


Expand Down
14 changes: 6 additions & 8 deletions packages/default/scss/calendar/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@
);
}


&[dir="rtl"],
.k-rtl & {
.k-calendar-navigation {
box-shadow: inset 1px 0 $kendo-calendar-navigation-border;
}
}

// Invalid
&.k-invalid,
&.k-invalid:hover,
Expand All @@ -140,6 +132,12 @@
}
}

.k-rtl .k-calendar,
.k-calendar[dir="rtl"] {
.k-calendar-navigation {
box-shadow: inset 1px 0 $kendo-calendar-navigation-border;
}
}

// Scheduler integration
.k-scheduler .k-calendar .k-other-month {
Expand Down
8 changes: 4 additions & 4 deletions packages/default/scss/card/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@
max-width: 100%;
flex-shrink: 0;
overflow: hidden;
}

.k-card-horizontal & {
max-width: $kendo-card-img-max-width;
object-fit: cover;
}
.k-card-horizontal .k-card-media {
max-width: $kendo-card-img-max-width;
object-fit: cover;
}


Expand Down
10 changes: 6 additions & 4 deletions packages/default/scss/chat/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,19 @@
fill: currentColor;
display: inline-block;
}
}
}

.k-rtl &,
[dir="rtl"] & {
.k-rtl,
[dir="rtl"] {
.k-message-box {
.k-button {
transform: scaleX(-1);
}
}
}




// Card list
.k-chat .k-card-list {
margin: $kendo-chat-bubble-spacing 0 0;
Expand Down
10 changes: 3 additions & 7 deletions packages/default/scss/datetimepicker/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@
transform: translateX(-100%);
}

.k-time-tab .k-datetime-selector {
&.k-rtl,
&[dir="rtl"],
.k-rtl &,
[dir="rtl"] & {
transform: translateX(100%);
}
:is(.k-rtl, [dir="rtl"]) .k-time-tab .k-datetime-selector,
.k-time-tab .k-datetime-selector:is(.k-rtl, [dir="rtl"]) {
transform: translateX(100%);
}
}

Expand Down
16 changes: 8 additions & 8 deletions packages/default/scss/expansion-panel/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
*::after {
box-sizing: border-box;
}
}

.k-rtl &,
&.k-rtl,
&[dir = "rtl"] {
// Expand / collapse icon
.k-expander-indicator {
margin-left: 0;
margin-right: $kendo-expander-indicator-margin-x;
}
.k-rtl .k-expander,
.k-expander.k-rtl,
.k-expander[dir="rtl"] {
// Expand / collapse icon
.k-expander-indicator {
margin-left: 0;
margin-right: $kendo-expander-indicator-margin-x;
}
}

Expand Down
11 changes: 5 additions & 6 deletions packages/default/scss/fab/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@
padding-inline: $kendo-fab-icon-padding-x;
padding-block: $kendo-fab-icon-padding-y;
box-sizing: content-box;

.k-icon-wrapper-host:not(:only-child) &,
&:not(:only-child) {
margin-inline-end: $kendo-fab-icon-spacing;
margin-inline-start: calc( #{$kendo-fab-icon-spacing} * -1 );
}
}

.k-icon-wrapper-host:not(:only-child) .k-fab-icon,
.k-fab-icon:not(:only-child) {
margin-inline-end: $kendo-fab-icon-spacing;
margin-inline-start: calc( #{$kendo-fab-icon-spacing} * -1 );
}

// Sizes
@each $size, $size-props in $kendo-fab-sizes {
Expand Down
41 changes: 20 additions & 21 deletions packages/default/scss/floating-label/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,32 @@
&.k-empty:not(.k-focus):not(:focus-within) ::placeholder {
color: transparent;
}
}

[dir="rtl"] &,
.k-rtl &,
&[dir="rtl"] {
[dir="rtl"] .k-floating-label-container,
.k-rtl .k-floating-label-container,
.k-floating-label-container[dir="rtl"] {
> .k-floating-label {
transform-origin: right center;
transition: transform $kendo-floating-label-transition, color $kendo-floating-label-transition, top $kendo-floating-label-transition, right $kendo-floating-label-transition;
}

&.k-empty {
> .k-floating-label {
transform-origin: right center;
transition: transform $kendo-floating-label-transition, color $kendo-floating-label-transition, top $kendo-floating-label-transition, right $kendo-floating-label-transition;
}

&.k-empty {
> .k-floating-label {
left: auto;
right: var(--kendo-floating-label-offset-x, #{$kendo-floating-label-offset-x});
}
}

> .k-floating-label,
&.k-focus > .k-floating-label {
left: auto;
right: var(--kendo-floating-label-focus-offset-x, #{$kendo-floating-label-focus-offset-x});
}
&:focus-within > .k-floating-label {
left: auto;
right: var(--kendo-floating-label-focus-offset-x, #{$kendo-floating-label-focus-offset-x});
right: var(--kendo-floating-label-offset-x, #{$kendo-floating-label-offset-x});
}
}

> .k-floating-label,
&.k-focus > .k-floating-label {
left: auto;
right: var(--kendo-floating-label-focus-offset-x, #{$kendo-floating-label-focus-offset-x});
}
&:focus-within > .k-floating-label {
left: auto;
right: var(--kendo-floating-label-focus-offset-x, #{$kendo-floating-label-focus-offset-x});
}
}

}
Expand Down
32 changes: 14 additions & 18 deletions packages/default/scss/forms/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,27 +197,23 @@
}

// RTL Adjustments
.k-form {
[dir="rtl"],
.k-rtl & {
.k-label-optional {
margin-left: 0;
margin-right: $kendo-label-optional-margin-x;
}
.k-form [dir="rtl"],
.k-rtl .k-form {
.k-label-optional {
margin-left: 0;
margin-right: $kendo-label-optional-margin-x;
}
}

.k-form-horizontal {
[dir="rtl"],
.k-rtl & {
&.k-form-field,
.k-form-field {
> .k-label,
> kendo-label,
> .k-form-label {
margin-right: 0;
margin-left: $kendo-horizontal-form-label-margin-x;
}
.k-form-horizontal [dir="rtl"],
.k-rtl .k-form-horizontal {
&.k-form-field,
.k-form-field {
> .k-label,
> kendo-label,
> .k-form-label {
margin-right: 0;
margin-left: $kendo-horizontal-form-label-margin-x;
}
}
}
Expand Down
23 changes: 11 additions & 12 deletions packages/default/scss/input/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
&:disabled,
&[disabled] {
@include disabled( $kendo-disabled-styling... );

[disabled] &,
.k-disabled & {
opacity: 1;
filter: grayscale(0);
}
}
}

:is([disabled], .k-disabled) :is(input.k-input, textarea.k-textarea):is(:disabled, [disabled]) {
opacity: 1;
filter: grayscale(0);
}

textarea.k-textarea {
overflow: auto;
}
Expand All @@ -90,15 +90,14 @@
&:disabled,
&[disabled] {
@include disabled( $kendo-disabled-styling... );

[disabled] &,
.k-disabled & {
opacity: 1;
filter: grayscale(0);
}
}
}

:is([disabled], .k-disabled) select.k-picker:is(:disabled, [disabled]) {
opacity: 1;
filter: grayscale(0);
}


// Input inner
.k-input-inner {
Expand Down
11 changes: 7 additions & 4 deletions packages/default/scss/map/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
border-radius: 50%;
position: relative;

.k-pdf-export & { display: none; }


// Buttons
.k-button {
Expand Down Expand Up @@ -125,10 +123,15 @@
border: 0;
background: none;
display: flex;

.k-pdf-export & { display: none; }
}


.k-pdf-export {
.k-navigator,
.k-zoom-control {
display: none;
}
}
}


Expand Down
8 changes: 6 additions & 2 deletions packages/default/scss/pager/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@
@if ($kendo-pager-item-spacing) {
margin-left: $kendo-pager-item-spacing;
}
}

.k-rtl &,
[dir="rtl"] & {
.k-rtl,
[dir="rtl"] {
.k-pager-nav + .k-pager-nav,
.k-pager-nav + .k-pager-numbers-wrap,
.k-pager-numbers-wrap + .k-pager-nav {
@if ($kendo-pager-item-spacing) {
margin-left: 0;
margin-right: $kendo-pager-item-spacing;
Expand Down
Loading

0 comments on commit 165ec66

Please sign in to comment.