Skip to content

Commit 9168fee

Browse files
committed
Combine overall ratings with about card at extraExtraLarge breakpoint
1 parent 31152e1 commit 9168fee

File tree

3 files changed

+52
-13
lines changed

3 files changed

+52
-13
lines changed

src/amo/components/ShowMoreCard/styles.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,27 @@
2727
}
2828
}
2929

30-
.AddonDescription,
31-
.PermissionsCard {
32-
.Card-contents {
33-
border-radius: 0;
30+
.AddonDescription {
31+
.ShowMoreCard-contents {
32+
// Keep in sync with `maxHeight` passed to the `ShowMoreCard` component in
33+
// `Addon/index.js`
34+
max-height: 172px;
3435
}
36+
}
3537

38+
.PermissionsCard {
3639
.ShowMoreCard-contents {
3740
// Keep in sync with `maxHeight` passed to the `ShowMoreCard` component in
38-
// `Addon/index.js` and `PermissionCard/index.js`.
41+
// `PermissionCard/index.js`.
3942
max-height: 300px;
4043
}
44+
}
45+
46+
.AddonDescription,
47+
.PermissionsCard {
48+
.Card-contents {
49+
border-radius: 0;
50+
}
4151

4252
&.ShowMoreCard--expanded .ShowMoreCard-contents {
4353
max-height: none;

src/amo/pages/Addon/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export class AddonBase extends React.Component {
322322
className={showMoreCardName}
323323
header={title}
324324
id={showMoreCardName}
325-
maxHeight={300}
325+
maxHeight={172}
326326
>
327327
{descriptionProps && Object.keys(descriptionProps).length ? (
328328
<div className="AddonDescription-contents" {...descriptionProps} />
@@ -547,9 +547,10 @@ export class AddonBase extends React.Component {
547547
</Card>
548548
) : null}
549549

550-
{this.renderAboutThisCard()}
551-
552-
{this.renderRatingsCard()}
550+
<Card className="Addon-description-rating-card">
551+
{this.renderAboutThisCard()}
552+
{this.renderRatingsCard()}
553+
</Card>
553554
</div>
554555

555556
<PermissionsCard version={currentVersion} />

src/amo/pages/Addon/styles.scss

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
.Addon .Card {
88
margin-bottom: $padding-page;
9-
10-
@include respond-to(large) {
11-
margin-bottom: $padding-page-l;
12-
}
139
}
1410

1511
.Addon-icon-wrapper {
@@ -117,6 +113,20 @@
117113
width: 100%;
118114
}
119115

116+
.Addon-description-rating-card > .Card-contents {
117+
display: flex;
118+
flex-direction: column;
119+
padding: 0;
120+
}
121+
122+
.Addon-description-rating-card .Addon-overall-rating {
123+
margin-bottom: 0;
124+
125+
.Card-contents {
126+
border-radius: 0;
127+
}
128+
}
129+
120130
// Details section with lots of grid stuff, on larger displays.
121131
@include respond-to(large) {
122132
.Addon-screenshots {
@@ -143,6 +153,24 @@
143153
.AddonMoreInfo dl {
144154
column-count: 3;
145155
}
156+
157+
.Addon-description-rating-card > .Card-contents {
158+
flex-direction: row;
159+
}
160+
161+
.Addon-description-rating-card {
162+
.AddonDescription,
163+
.Addon-overall-rating {
164+
margin-bottom: 0;
165+
width: 50%;
166+
167+
.Card-contents,
168+
.Card-header,
169+
.Card-footer {
170+
border-radius: 0;
171+
}
172+
}
173+
}
146174
}
147175

148176
.Addon-WrongPlatformWarning {

0 commit comments

Comments
 (0)