fomantic-ui
Version:
Fomantic empowers designers and developers by creating a shared vocabulary for UI.
182 lines (157 loc) • 4.24 kB
text/less
/*!
* # Fomantic-UI - Rating
* https://github.com/fomantic/Fomantic-UI/
*
*
* Released under the MIT license
* https://opensource.org/licenses/MIT
*
*/
/*******************************
Theme
*******************************/
: "module";
: "rating";
(multiple) "../../theme.config";
/*******************************
Rating
*******************************/
.ui.rating {
display: inline-flex;
white-space: ;
vertical-align: ;
}
.ui.rating:last-child {
margin-right: 0;
}
/* Icon */
.ui.rating .icon {
padding: 0;
margin: 0;
text-align: center;
font-weight: ;
font-style: normal;
flex: 1 0 auto;
cursor: ;
width: ;
height: ;
transition: ;
line-height: 1;
backface-visibility: hidden;
}
/*******************************
Types
*******************************/
/* -------------------
Standard
-------------------- */
/* Inactive Icon */
.ui.rating .icon {
background: ;
color: ;
}
/* Active Icon */
.ui.rating .active.icon {
background: ;
color: ;
}
& when ( ) {
/* Partially Active Icon */
.ui.rating .icon.partial.active {
background: linear-gradient(to right, 0% var(--full), var(--full) 100%);
}
/* central override for colors */
.ui.ui.ui.rating .icon.partial.active {
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: none;
}
}
/* Selected Icon */
.ui.rating .icon.selected,
.ui.rating .icon.selected.active,
.ui.rating .icon.selected.partial.active {
background: ;
color: ;
background-clip: unset;
}
/* --------------
Colors
-------------- */
& when not ( = false) {
each( , {
: ;
: [@ ][color];
: [@ ][light];
: [@ ][hover];
: [@ ][lightHover];
.ui.@{color}.rating .active.icon {
color: ;
text-shadow:
0 - 0 ,
- 0 0 ,
0 0 ,
0 0 ;
}
.ui.@{color}.rating .icon.selected,
.ui.@{color}.rating .icon.selected.active,
.ui.@{color}.rating .icon.selected.partial.active {
background: inherit;
color: ;
text-shadow:
0 - 0 ,
- 0 0 ,
0 0 ,
0 0 ;
-webkit-text-stroke: unset;
background-clip: unset;
}
& when ( ) {
.ui.@{color}.rating .icon.partial.active {
background: linear-gradient(to right, 0% var(--full), var(--full) 100%);
-webkit-text-stroke: 0.78px;
}
}
});
}
/*******************************
States
*******************************/
& when ( ) {
/* -------------------
Disabled
-------------------- */
/* disabled rating */
.ui.disabled.rating .icon {
cursor: default;
pointer-events: none;
}
}
/* -------------------
User Interactive
-------------------- */
/* Selected Rating */
.ui.rating.selected .active.icon {
opacity: ;
}
.ui.rating.selected .icon.selected,
.ui.rating .icon.selected {
opacity: ;
}
/*******************************
Variations
*******************************/
.ui.rating {
font-size: ;
}
& when not ( = false) {
each( , {
: @ ;
.ui.@{value}.rating {
font-size: ;
}
});
}
// stylelint-disable no-invalid-position-at-import-rule
(multiple, optional) "../../overrides.less";