addons-server/media/css/mkt/ratings.less

506 строки
11 KiB
Plaintext

@import 'lib';
// On page load this gets transformed by JS into a star picker.
select[name=rating] {
display: none;
}
section.replies .review.reply {
display: block;
}
#reviews-info {
margin-top: 20px;
position: relative;
}
// Detail page.
#reviews {
position: relative;
ul {
margin: 0;
padding: 0;
}
#submit-review {
position: absolute;
margin: 10px 0;
}
.not-rated + p a {
padding: 5px 20px 5px 0;
}
}
.review {
.transition(~'.3s all');
list-style-type: none;
padding: 10px 16px;
position: relative;
&.reply {
background: url(../../img/mkt/icons/reply.png) 10px 15px no-repeat;
display: none;
padding-left: 35px;
}
&.deleting {
background: fade(@red, 40%);
}
&.deleted {
border: 0;
height: 0;
overflow: hidden;
padding: 0;
+ .review {
border-top: 0;
}
}
.byline, .timestamp {
font-size: 12px;
}
.byline {
color: @medium-gray;
font-weight: 600;
line-height: 18px;
vertical-align: middle;
b {
color: @gray;
}
strong {
color: #444;
}
}
.timestamp {
color: @note-gray;
float: right;
&:hover {
color: @gray;
}
}
.body {
margin: 5px 0 15px;
}
.view-reply {
font-size: 12px;
font-weight: 600;
padding: 5px 10px;
}
ul {
float: left;
list-style: none;
}
li {
display: inline-block;
&.hidden {
display: none;
}
&:not(.hidden) + li:before,
+ li.hidden + li:before {
color: @note-gray;
content: "\00a0\2022\00a0\00a0";
}
}
}
// This applies to "app details" pages only.
.reviews {
border-top: 1px solid rgba(255,255,255,.5);
border-bottom: 1px solid rgba(3,16,26,.13);
.not-rated {
color: lighten(@text, 5%);
font-size: 14px;
font-weight: 600;
margin: 0;
}
#reviews {
margin: 15px;
}
}
#reviews-detail {
padding: 15px;
ul {
margin: 0;
padding: 0;
.review {
padding: 0;
}
}
}
// This applies to "reviews list" pages only.
// TODO: make proper review tiles. This is an interim solution.
.reviews-listing {
#add-review {
margin: 30px 16px;
}
.button.fat {
line-height: 35px;
height: 35px;
&:hover {
line-height: 35px;
}
}
.review {
border-top: 1px solid #bcc0c2;
border-bottom: 1px solid #bcc0c2;
&:nth-of-type(2n) {
border-top: 1px solid #eceff0;
border-bottom: 0;
}
}
}
#review-list .review:nth-of-type(2n + 1) {
background-color: darken(@bg, 5%);
+ .replies .review {
background-color: darken(@bg, 5%);
}
}
/*
// TODO: Expose later sometime (`rating_header` function)
header.product {
margin-bottom: 15px;
position: relative;
.visual {
margin-right: 15px;
height: 64px;
width: 64px;
+ div {
float: left;
max-width: 905px;
}
}
h1 {
color: @navy-gray;
font-size: 22px;
font-weight: 400;
line-height: 1.2;
&.multi {
font-size: 22px;
small, span {
.ellipsis;
display: block;
margin-bottom: -8px;
padding-bottom: 6px;
}
small {
color: lighten(@navy-gray, 10%);
display: block;
font-size: 14px;
font-weight: 600;
}
}
}
p {
font-size: 14px;
line-height: 1;
margin: 5px 0;
}
}
*/
#submit-review {
padding: 0 15px;
header.product .simple-field,
&.friendly header .errorlist {
margin: 5px 0 0;
}
h2 {
font-size: 18px;
font-weight: 400;
}
.req,
label[for=id_rating] {
display: none;
}
}
// 180x18, 120x12, 90x9, 332x32
.stars {
background: url(../../img/mkt/stars/sprite_12.png) no-repeat;
display: inline-block;
height: 15px;
margin-right: 4px;
text-indent: -9999px;
vertical-align: middle;
width: 60px;
&.stars-4 { background-position: -12px 1px; }
&.stars-3 { background-position: -24px 1px; }
&.stars-2 { background-position: -36px 1px; }
&.stars-1 { background-position: -48px 1px; }
&.stars-0 { background-position: -60px 1px; }
&.ratingwidget {
background: url(../../img/mkt/stars/sprite_32.png) repeat-x;
background-repeat: repeat-x 5px 0;
height: 32px;
width: 200px;
// Yeah, maybe I should just set a class in JS. I thought I was being clever.
&.stars-1 label[data-stars="1"], &.stars-2 label[data-stars="1"], &.stars-2 label[data-stars="2"],
&.stars-3 label[data-stars="1"], &.stars-3 label[data-stars="2"], &.stars-3 label[data-stars="3"],
&.stars-4 label[data-stars="1"], &.stars-4 label[data-stars="2"], &.stars-4 label[data-stars="3"], &.stars-4 label[data-stars="4"],
&.stars-5 label[data-stars="1"], &.stars-5 label[data-stars="2"], &.stars-5 label[data-stars="3"], &.stars-5 label[data-stars="4"], &.stars-5 label[data-stars="5"] {
background: url(../../img/mkt/stars/sprite_32.png) 100% 100%;
}
label {
height: 32px;
width: 40px;
}
}
&.large {
background: url(../../img/mkt/stars/sprite_18.png) no-repeat 0 1px;
width: 90px;
height: 18px;
&.stars-4 { background-position: -18px 1px; }
&.stars-3 { background-position: -36px 1px; }
&.stars-2 { background-position: -54px 1px; }
&.stars-1 { background-position: -72px 1px; }
&.stars-0 { background-position: -90px 1px; }
}
}
.html-rtl .stars {
margin: 0 0 0 4px;
}
.creatured .stars,
.featured .stars {
background-image: url(../../img/mkt/stars/sprite_9.png);
height: 9px;
width: 45px;
&.stars-4 { background-position: -9px 0; }
&.stars-3 { background-position: -18px 0; }
&.stars-2 { background-position: -27px 0; }
&.stars-1 { background-position: -36px 0; }
&.stars-0 { background-position: -45px 0; }
}
.featured .rating .cnt {
display: none;
}
.no-rating strong {
font-size: 12px;
font-weight: 700;
}
.average-rating {
span {
color: @text;
vertical-align: bottom;
&:first-child {
line-height: 18px;
padding-right: 6px;
}
}
}
.full #add-first-review {
margin-top: 15px;
}
.split {
+ .split {
margin-top: 15px;
}
}
@media (min-width: @7col) {
.split {
float: left;
padding: 0 5px 15px 0;
width: 50%;
+ .split {
margin-top: 0;
padding: 0 0 15px 5px;
}
}
}
.simple-field.rating {
.border-radius(4px);
.box-shadow(inset 0 1px 4px rgba(0,0,0,.25),
inset 0 1px 0 fade(@white, 80%),
0 1px 0 fade(@white, 80%));
background: rgba(200,200,200,.2);
margin-bottom: 15px;
padding: 20px 10px;
.ratingwidget {
margin: 0 auto;
}
.errorlist {
margin-top: 10px;
text-align: center;
}
}
.ratingwidget {
display: block;
float: none;
width: 65px;
input {
display: none;
}
label {
cursor: pointer;
display: block;
float: left;
margin: 0;
text-indent: -9999px;
width: 13px;
}
}
/*
// TODO: Expose maybe later.
.grouped-ratings {
.border-radius(4px);
background: rgb(226,230,233);
border: 1px solid @bg-gray;
color: @medium-gray;
display: none;
padding: 17px 15px;
position: relative;
top: -5px;
width: 100%;
z-index: 0;
// The arrow.
&:before {
.transform(~'rotate(45deg)');
background: rgb(226,230,233);
border: 1px solid @bg-gray;
border-width: 1px 0 0 1px;
content: "";
height: 12px;
position: absolute;
top: -8px;
left: 116px;
right: 22px;
width: 12px;
z-index: 0;
}
.rating-bar {
height: 22px;
float: left;
overflow: visible;
width: 96px;
// OMFG.
&:before {
.box-shadow(0 3px 6px @dark-gray);
content: "";
display: block;
height: 22px;
position: absolute;
top: 0;
left: 71px; // old stars: 96px
width: 2px;
z-index: 0;
}
&:after {
content: "";
background: rgb(226,230,233);
height: 36px;
position: absolute;
top: -5px;
left: 64px; // old stars: 89px
width: 9px;
z-index: 1;
}
.bar {
background: rgb(205,210,214);
border-top: rgb(183,188,192) 1px solid;
border-bottom: rgb(234,238,239) 1px solid;
display: block;
height: 4px;
position: relative;
margin: 10px 10px 0 3px;
&:before {
background: @barely-gray;
content: "";
display: block;
height: 22px;
position: absolute;
top: -11px;
left: -2px;
width: 1px;
}
}
}
li {
position: relative;
&:first-child,
&:last-child {
.rating-bar:before {
.box-shadow(0 3px 6px @medium-gray);
}
.bar:before {
height: 26px;
}
}
&:first-child .bar:before {
top: -10px;
}
}
.num-ratings {
color: lighten(@navy-gray, 10%);
font-size: 11px;
line-height: 8px;
position: absolute;
top: -2px;
right: -5px;
width: 1px;
word-wrap: normal;
}
.stars {
float: left;
margin: 7px 8px 0 0; // old stars: 4px 8px 0 0
}
}
*/
.items-profile {
padding: 0;
.review {
background: @white;
}
.review:first-child {
border-top: 1px solid @light-gray;
}
.review-inner {
padding: 0 10px 0 95px;
}
h3 {
font-size: 18px;
}
.icon-profile {
position: absolute;
left: 10px;
max-height: 64px;
max-width: 64px;
}
.byline {
display: none;
}
.body {
margin: 5px 0;
}
.timestamp {
position: absolute;
top: 10px;
right: 10px;
}
.actions {
position: absolute;
bottom: 15px;
right: 10px;
}
}
.submit-review {
float: left;
}
p.support-link {
float: right;
font-size: 13px;
margin-top: 48px;
}