@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
187 lines (158 loc) • 4.39 kB
text/less
// Switch
.k-switch-track {
.box-shadow( @switch-container-shadow );
}
.k-switch-thumb {
background-clip: border-box;
}
.k-switch-on {
.box-shadow( @switch-on-shadow );
.k-switch-track {
.fill(
@switch-on-text,
@switch-on-bg,
@switch-on-border
);
.composite-background( @switch-on-gradient );
}
.k-switch-thumb {
.fill(
@switch-on-handle-text,
@switch-on-handle-bg,
@switch-on-handle-border
);
.composite-background( @switch-on-handle-gradient );
.box-shadow( @switch-on-handle-shadow );
}
&:focus,
&.k-state-focused {
.box-shadow( @switch-on-focused-shadow );
.k-switch-track {
.fill(
@switch-on-focused-text,
@switch-on-focused-bg,
@switch-on-focused-border,
);
.composite-background( @switch-on-focused-gradient );
}
.k-switch-thumb {
.fill(
@switch-on-handle-focused-text,
@switch-on-handle-focused-bg,
@switch-on-handle-focused-border
);
.composite-background( @switch-on-handle-focused-gradient );
}
}
&:hover,
&.k-state-hover {
.k-switch-track {
.fill(
@switch-on-hovered-text,
@switch-on-hovered-bg,
@switch-on-hovered-border,
);
.composite-background( @switch-on-hovered-gradient );
}
.k-switch-thumb {
.fill(
@switch-on-handle-hovered-text,
@switch-on-handle-hovered-bg,
@switch-on-handle-hovered-border
);
.composite-background( @switch-on-handle-hovered-gradient );
}
}
.k-switch-label-off {
color: transparent;
}
}
.k-switch-off {
.box-shadow( @switch-off-shadow );
.k-switch-track {
.fill(
@switch-off-text,
@switch-off-bg,
@switch-off-border
);
.composite-background( @switch-off-gradient );
}
.k-switch-thumb {
.fill(
@switch-off-handle-text,
@switch-off-handle-bg,
@switch-off-handle-border
);
.composite-background( @switch-off-handle-gradient );
.box-shadow( @switch-off-handle-shadow );
}
&:focus,
&.k-state-focused {
.box-shadow( @switch-off-focused-shadow );
.k-switch-track {
.fill(
@switch-off-focused-text,
@switch-off-focused-bg,
@switch-off-focused-border
);
.composite-background(@switch-off-focused-gradient);
}
.k-switch-thumb {
.fill(
@switch-off-handle-focused-text,
@switch-off-handle-focused-bg,
@switch-off-handle-focused-border
);
.composite-background( @switch-off-handle-hovered-gradient );
}
}
&:hover,
&.k-state-hover {
.k-switch-track {
.fill(
@switch-off-hovered-text,
@switch-off-hovered-bg,
@switch-off-hovered-border
);
.composite-background(@switch-off-hovered-gradient);
}
.k-switch-thumb {
.fill(
@switch-off-handle-hovered-text,
@switch-off-handle-hovered-bg,
@switch-off-handle-hovered-border
);
.composite-background( @switch-off-handle-hovered-gradient );
}
}
.k-switch-label-on {
color: transparent;
}
}
.k-switch {
background-color: transparent;
box-shadow: none;
&:focus,
&.k-state-focused {
.k-switch-track {
outline: none;
.box-shadow( @switch-container-focused-shadow );
}
}
&:hover,
&.k-state-hover {
.k-switch-track {
.box-shadow( @switch-container-hovered-shadow );
}
}
&.k-state-disabled {
cursor: default;
&:focus,
&.k-state-focused {
.box-shadow( @switch-container-shadow );
}
}
&[aria-readonly="true"] {
pointer-events: none;
}
}