Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

move buttons (bug 1161854) #1195

Merged
merged 1 commit into from May 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/media/css/app-list-filters.styl
Expand Up @@ -134,7 +134,7 @@ App listing filters.
// App list expand toggle.
.app-list-filters-expand-wrapper {
display: flex;
margin: 0 30px;
margin: 0;

.app-list-filters-expand-toggle.show {
display: block;
Expand Down
1 change: 1 addition & 0 deletions src/media/css/app-list.styl
Expand Up @@ -12,6 +12,7 @@ $tile-padding-y = 20px;
$desktop-tile-padding = $tile-padding-y $tile-padding-x;

.app-list-page {
min-height: 365px;
padding: 10px 0;

&.full > div {
Expand Down
83 changes: 45 additions & 38 deletions src/media/css/buttons.styl
@@ -1,16 +1,16 @@
@import 'lib';

$arrow-btn-size = 30px;

$btn-color = $action-positive;
// Install button width.
$btn-install-width = 90px;

// Install button font-size.
$btn-install-font-size = 12px;

.button {
border: 0;
btn_color($action-positive, $action-positive-tapped, $action-positive-hover, true);
btn_color($action-positive, $action-positive-tapped,
$action-positive-hover, false);
color: $white;
display: inline-block;
ellipsis();
Expand All @@ -25,19 +25,13 @@ $btn-install-font-size = 12px;
&:focus, &:hover, &:active {
text-decoration: none;
}
&:not([disabled]):active {
// Override `button:not([disabled]):active` from site.styl.
background: $action-positive-tapped;
}
&.action {
btn_color($action-success, $action-success-tapped, $action-success-hover, true);
btn_color($action-success, $action-success-tapped,
$action-success-hover, false);
}
&.cancel {
btn_color($action-error, $action-error-tapped, $action-error-hover, true);
}
&.disabled,
&[disabled] {
btn_color($action-disabled, $action-disabled, $action-disabled, false);
btn_color($action-error, $action-error-tapped, $action-error-hover,
false);
}
&[disabled],
&.disabled,
Expand Down Expand Up @@ -76,9 +70,6 @@ $btn-install-font-size = 12px;
top: 8px;
}
}
&.product {
padding: 0 32px;
}
.spin {
display: inline-block;
spinner('install');
Expand All @@ -94,7 +85,8 @@ a.button {
}

.arrow-btn {
background: $action-positive url(../img/pretty/arrow-l.svg) no-repeat 5px 50% / 15px 15px;
background: $action-positive url(../img/pretty/arrow-l.svg) no-repeat \
5px 50% / 15px 15px;
border: 1px solid $white;
border-radius: 50%;
color: transparent;
Expand All @@ -108,7 +100,8 @@ a.button {
background-color: $action-positive-hover;
}
&:active {
background: $action-positive-tapped url(../img/pretty/arrow-l.svg) no-repeat 5px 50% / 15px 15px;
background: $action-positive-tapped url(../img/pretty/arrow-l.svg) \
no-repeat 5px 50% / 15px 15px;
}
&.arrow-btn-next {
background-position: 5px 50%;
Expand Down Expand Up @@ -138,60 +131,73 @@ a.button {
}
}

// Install buttons.
.button.install {
// Unset many .button properties to compensate for larger click target.
.mkt-app-button {
align-items: center;
btn_color(transparent, transparent, transparent, false);
border-radius: 5px;
cursor: pointer;
display: flex;
font-size: $btn-install-font-size;
height: 34px; // Actual click-target height. Queen Krupa request.
min-width: $btn-install-width;
padding: 0;
position: absolute;
right: 0;
height: 34px;
margin-top: 8px;
width: fit-content;

&.button {
padding: 0;
}
+rtl() {
left: 0;
right: inherit;
}
em {
// This em becomes the visual button.
btn_color($action-positive, $action-positive-tapped, $action-positive-hover, true);
btn_color($btn-color, $action-positive-tapped,
$action-positive-hover, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can never get continuation lines to work in stylus. Should this stay on one line to be consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to wrap arguments within a Stylus mixin call? For plain rules, you need to backslash at EOL. So if we just follow 80 chars, that's consistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to limit to 80 chars in stylus that sounds good, there are some more long btn_color(...) lines above then that should be wrapped.

display: inline-block;
ellipsis();
font-style: normal;
height: $btn-tiny;
line-height: $btn-tiny;
min-width: 90px;
padding: 0 $btn-h-padding;
position: relative;
vertical-align: bottom;
width: $btn-install-width;
width: fit-content;
}
&:hover em {
background: $action-positive-hover;
}
&:active em {
background: $action-positive-tapped;
}
&[disabled] em {
btn_color($greyscale-grey, $greyscale-grey, $greyscale-grey, false);
}
.spin {
display: none;
}
// Accomodate a better vertical align since this state has no box-shadow.
&[disabled] em {
btn_color($action-disabled, $action-disabled, $action-disabled, false)
}
&.spinning,
&.purchasing {
background: $action-positive-tapped;
bottom: 0;
height: $btn-tiny;

em {
display: none;
.mkt-app-button-text {
visibility: hidden;
}
.spin {
.mkt-app-button-spinner {
bottom: 0;
display: inline-block;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
}
}
+detail() {
margin-top: 0;
width: fit-content;
}
+rtl() {
left: 0;
right: inherit;
Expand All @@ -203,11 +209,12 @@ a.button {
}

// Install button launch state.
.button.launch {
.mkt-app-button.launch {
btn_color(transparent, transparent, transparent, false);

em {
btn_color($action-success, $action-success-tapped, $action-success-hover, true);
btn_color($action-success, $action-success-tapped,
$action-success-hover, false);
}
&:hover em,
&:focus em {
Expand Down
1 change: 1 addition & 0 deletions src/media/css/compat-filter.styl
Expand Up @@ -3,6 +3,7 @@
[data-page-type~="app-list"],
[data-page-type~="collection-landing"],
[data-page-type~="editorial-landing"],
[data-page-type~="shelf-landing"],
[data-page-type~="homepage"] {
.compat-filter {
display: block;
Expand Down
74 changes: 21 additions & 53 deletions src/media/css/detail/header.styl
Expand Up @@ -14,36 +14,27 @@
}
}

[data-page-type~="detail"] {
.mkt-tile {
padding-bottom: 10px;
[data-page-type~="detail"] .app-notices {
border-top: 1px solid $tile-border;
margin-top: 0;
padding: 10px 0;
text-align: center;
width: 100%;

.rating {
padding: 15px 0;
}
}
.app-notices {
border-top: 1px solid $tile-border;
margin-top: 0;
padding: 10px 0;
text-align: center;
width: 100%;
> span {
background: $action-positive;
border-radius: 100px;
color: $white;
display: inline-block;
font-weight: 300;
margin: 5px;
padding: 8px 15px;

> span {
background: $action-positive;
border-radius: 100px;
color: $white;
display: inline-block;
font-weight: 300;
margin: 5px;
padding: 8px 15px;

&.positive {
background: $action-success;
}
&.negative {
background: $action-error;
}
&.positive {
background: $action-success;
}
&.negative {
background: $action-error;
}
}
}
Expand Down Expand Up @@ -71,45 +62,21 @@
margin-bottom: 70px;
}
.mkt-tile {
padding-bottom: 50px;
position: relative;
margin: 0 auto;
width: 50%;

.icon {
// Get the icon in the middle.
bottom: 15px;
height: 128px;
left: 0;
margin: 0 auto;
right: 0;
position: absolute;
text-align: center;
top: -64px;
width: 128px;
}
.info {
padding: 0;
position: relative;
}
[itemprop="name"] {
desktop_mega();
margin-bottom: 30px;
padding-top: 45px;
position: relative;
text-align: center;
top: 15px;
}
[itemprop="creator"] {
font-weight: 300;
font-size: 20px;
line-height: 20px;
max-width: 410px;
}
.rating {
font-weight: 300;
font-size: 20px;
padding: 18px 0;
}
.cnt {
margin: 0 10px 0 0;

Expand Down Expand Up @@ -139,4 +106,5 @@
position: relative;
top: 4px;
}

}
3 changes: 2 additions & 1 deletion src/media/css/feed/feed.styl
Expand Up @@ -46,8 +46,9 @@

.feed-app {
margin-bottom: 0;
padding: 0 15px 10px;
padding: 20px 15px 10px;
position: relative;
max-width: 100%;

&,
&:active {
Expand Down