// /** // * Copyright © Magento, Inc. All rights reserved. // * See COPYING.txt for license details. // */ // # Ratings // // Ratings styling mixins are based on using font icons as rate symbols. There are two types of ratings: rating which allows user to vote and rating which displays voting results summary. Depending on the rating type mixin .lib-rating-vote() or .lib-rating-summary() is used. // // # Global rating variables // // Global styles for both types of ratings can be modified by changing global variables. To set different styles to types of ratings these variables should be used directly in the mixin call. // //
//    
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//        
//            
//            
//            
//            
//            
//        
//    
Mixin variableGlobal variableDefault valueAllowed valuesComment
@_icon-content@rating-icon__content@icon-star'' | false | icon codeRating icon symbol code
@_icon-count@rating-icon__count5'' | valueNumber of rating icon symbols
@_icon-font@rating-icon__font@icon-font'' | false | valueIcon font
@_icon-font-size@rating-icon__font-size28px'' | false | valueIcon font size
@_icon-letter-spacing@rating-icon__letter-spacing-10px'' | false | valueIcon letter spacing
@_icon-color@rating-icon__color#c7c7c7'' | false | valueUnselected icons color
@_icon-color-active@rating-icon__active__color#ff5601'' | false | valueSelected and hovered icons color
@_label-hide@rating-label__hidefalsetrue | falseRating label is displayed
//
// // # Rating with vote // // To implement rating with vote, use the .lib-rating-vote() mixin. // ``` html //
// // // // // // // // // // //
// ``` .example-ratings-1 { .lib-rating-vote(); } // # Rating with vote icons number customization // // To change number of icons, add desired number of rating icons (input + label) to the markup. Then set this number to the @_icon-count mixin variable. // // ``` html //
// // // // // // // // // // // // // // // // //
// ``` .example-ratings-2 { .lib-rating-vote( @_icon-count: 8 ); } // # Rating with vote icons colors customization // // These variables control default and active icon colors: // ```css // @_icon-color: value, // @_icon-color-active: value // ``` // // ``` html //
// // // // // // // // // // //
// ``` .example-ratings-3 { .lib-rating-vote( @_icon-color: #aff5e3, @_icon-color-active: #0a6767 ); } // # Rating with vote icons symbol customization // // To set custom icon symbol, use the @_icon-content variable // // ``` html //
// // // // // // // // // // //
// ``` .example-ratings-4 { .lib-rating-vote( @_icon-content: @icon-wishlist-full ); } // # Accessible rating with vote // // The following markup corresponds to **accesibility** demands // ``` html //
// How do you rate this product? //
// //
// // // // // // // // // // //
//
//
// ``` .exapmle-ratings-5 { .control.rating.vote { .lib-rating-vote(); } } // # Rating summary // // To implement rating summary, use the following markup // ``` html //
// Rating //
// 60 //
//
// ``` .example-rating-summary-1 { .lib-rating-summary(); } // # Rating summary icons number customization // // To set up number of icons, use the variable: // ```css // @_icon-count: number // ``` // // ``` html //
// Rating //
// 40 //
//
// ``` .example-rating-summary-2 { .lib-rating-summary( @_icon-count: 8 ); } // # Rating summary icons color customization // // To set up the icons default and selected color, use variables: // ```css // @_icon-color: value // @_icon-color-active: value // ``` // // ``` html //
// Rating //
// 40 //
//
// ``` .example-rating-summary-3 { .lib-rating-summary( @_icon-color: #aff5e3, @_icon-color-active: #0a6767 ); } // # Rating summary icons symbol customization // // To set up the icons symbol use variable: // ```css // @_icon-content: icon_code // ``` // // ``` html //
// Rating //
// 40 //
//
// ``` .example-rating-summary-4 { .lib-rating-summary( @_icon-content: @icon-wishlist-full ); } // # Rating summary hide label // // To hide the rating summary label set: // ```css // @_label-hide: true // ``` // // ``` html //
// Rating //
// 40 //
//
// ``` .example-rating-summary-5 { .lib-rating-summary( @_label-hide: true ); } // # Rating summary multiple ratings // // ``` html //
// Your Rating: //
// Value //
// 100% //
//
//
// Quality //
// 100% //
//
//
// rating + //
// 20% //
//
//
// Price //
// 40% //
//
//
// ``` .example-rating-summary-6 { .rating-summary { .lib-rating-summary(); } } // # Rating hide label mixin // // The .lib-rating-summary-label-hide() mixin is used to hide rating label in summary rating. // // ``` html //
// Rating //
// 40 //
//
// ``` .example-rating-summary-7 { .lib-rating-summary(); .lib-rating-summary-label-hide(); }