Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pkg/web_css/lib/src/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/******************************************************
site base
******************************************************/

@use 'variables';

* {
box-sizing: border-box;
}
Expand Down Expand Up @@ -113,7 +116,7 @@ main {
/* Useful for synchronizing the alignment of different page blocks. */
.container,
.-wide-header-detail-page .detail-container {
max-width: $site-max-width;
max-width: variables.$site-max-width;
/* The top and bottom margins are left on default to allow `main` to set it. */
margin-left: auto;
margin-right: auto;
Expand Down Expand Up @@ -219,7 +222,7 @@ pre {
box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.05);

white-space: nowrap;
transition: opacity $copy-feedback-transition-opacity-delay;
transition: opacity variables.$copy-feedback-transition-opacity-delay;

&.visible {
display: block;
Expand Down
27 changes: 14 additions & 13 deletions pkg/web_css/lib/src/_detail_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file. */

@use 'variables';

$info-box-width: 190px;
$info-box-margin: 120px;
$info-box-tablet-margin: 40px;
Expand All @@ -19,7 +21,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);

.detail-header {
// On desktop this will make the wide header block to be centered.
@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
display: flex;
}
}
Expand All @@ -34,7 +36,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
}

.detail-info-box {
@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: none;
}
}
Expand All @@ -51,7 +53,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
top: 0px;
right: 0px;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
width: $info-box-width + 10px;
}

Expand All @@ -60,15 +62,15 @@ $detail-tabs-tablet-width: calc(100% - 240px);
}

.ff-banner-desktop {
@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
display: inline-block;
width: 75px;
height: 109px;
}
}

.ff-banner-mobile {
@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: inline-block;
width: 47px;
height: 58px;
Expand All @@ -84,7 +86,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
margin: 0;
font-size: 24px;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
font-size: 36px;
}
}
Expand All @@ -102,7 +104,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
display: none;
margin-top: 16px;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: block;
}

Expand Down Expand Up @@ -139,7 +141,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
max-width: 200px;
max-height: 200px;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
max-width: 100px;
max-height: 100px;
}
Expand All @@ -153,7 +155,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
display: flex;
align-items: center;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
display: inline-flex;
margin-right: 16px;
}
Expand Down Expand Up @@ -234,7 +236,6 @@ $detail-tabs-tablet-width: calc(100% - 240px);
filter: brightness(50%);
}


.weekly-downloads-sparkline {
display: flex;
height: 105px;
Expand Down Expand Up @@ -284,7 +285,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
stroke-width: 2;
}

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
.detail-body {

>.detail-tabs {
Expand All @@ -296,7 +297,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
margin-left: $info-box-margin;
width: $info-box-width;

@media (max-width: $device-tablet-max-width) {
@media (max-width: variables.$device-tablet-max-width) {
margin-left: $info-box-tablet-margin;
}
}
Expand All @@ -308,7 +309,7 @@ $detail-tabs-tablet-width: calc(100% - 240px);
display: inline-block;
width: $detail-tabs-width;

@media (max-width: $device-tablet-max-width) {
@media (max-width: variables.$device-tablet-max-width) {
width: $detail-tabs-tablet-width;
}
}
Expand Down
16 changes: 9 additions & 7 deletions pkg/web_css/lib/src/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
home page
******************************************************/

@use 'variables';

.home-banner {
text-align: center;
padding: 30px 20px 0px 20px;
Expand All @@ -16,7 +18,7 @@
max-height: 70px;
margin-bottom: 28px;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
max-width: 188px;
max-height: 40px;
margin-bottom: 22px;
Expand Down Expand Up @@ -115,7 +117,7 @@
background: var(--pub-neutral-hover-bgColor);
box-shadow: 0px 4px 9px 0px var(--pub-home_card_hover-box_shadow-color);

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
.mini-list-item-body {
&:before {
background: linear-gradient(transparent 90%, var(--pub-neutral-hover-bgColor));
Expand Down Expand Up @@ -166,7 +168,7 @@
text-align: right;
padding-right: 8px;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
margin-right: 16px;
}
}
Expand All @@ -177,7 +179,7 @@
text-transform: uppercase;
}

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
.mini-list {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -215,7 +217,7 @@
}
}

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
&.home-block-ff,
&.home-block-pow {
.home-block-content {
Expand Down Expand Up @@ -282,7 +284,7 @@
padding: 4px;
margin: -3px -3px 10px -3px;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
display: flex;
}

Expand All @@ -302,7 +304,7 @@
.pow-video-thumbnail {
height: auto;
width: 100%;
@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
max-width: 260px;
max-height: 195px;
}
Expand Down
14 changes: 8 additions & 6 deletions pkg/web_css/lib/src/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file. */

@use 'variables';

.listing-info {
display: flex;
padding: 16px 0px 20px 0px;
Expand Down Expand Up @@ -29,7 +31,7 @@
text-transform: uppercase;
white-space: nowrap;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: none;
}
}
Expand Down Expand Up @@ -60,7 +62,7 @@
position: absolute;
right: 0px;
white-space: nowrap;
z-index: $z-index-nav-mask;
z-index: variables.$z-index-nav-mask;

.sort-control-option {
display: block;
Expand Down Expand Up @@ -92,7 +94,7 @@

&:hover {
.sort-control-popup {
@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
display: block;
}
}
Expand Down Expand Up @@ -303,7 +305,7 @@
padding: 0;
margin: 8px 0;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
padding: 4px 8px;
margin-left: -8px;
}
Expand Down Expand Up @@ -376,7 +378,7 @@
.search-form-container {
display: flex;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: block;

.search-form {
Expand All @@ -395,7 +397,7 @@
flex-shrink: 0;
flex-basis: 200px;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
margin-right: 40px;
}
}
Expand Down
16 changes: 9 additions & 7 deletions pkg/web_css/lib/src/_pkg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file. */

@use 'variables';

.package-badge {
display: inline-block;
background: var(--pub-neutral-bgColor);
Expand Down Expand Up @@ -57,7 +59,7 @@
&.badge {
width: 100px;

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
display: none;
}
}
Expand Down Expand Up @@ -97,7 +99,7 @@
display: none;
}

@media (max-width: $device-mobile-max-width) {
@media (max-width: variables.$device-mobile-max-width) {
&.sdk > span.label,
&.uploaded > span.label {
display: none;
Expand Down Expand Up @@ -144,7 +146,7 @@
justify-content: space-evenly;
padding: 20px 0 30px 0;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
padding: 40px 0 50px 0;
}

Expand All @@ -158,7 +160,7 @@
font-size: 32px;
line-height: 1;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
font-size: 64px;
}
}
Expand Down Expand Up @@ -249,7 +251,7 @@

.markdown-body {
table {
@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
// Normally markdown-tables do use 100% width, but for
// an unknown layout rule this is not doing it.
// Forcing table to take the maximum available width,
Expand Down Expand Up @@ -311,7 +313,7 @@

opacity: 1;
display: none;
transition: opacity $copy-feedback-transition-opacity-delay;
transition: opacity variables.$copy-feedback-transition-opacity-delay;

>.code {
font-family: var(--pub-code-text-font_family);
Expand Down Expand Up @@ -340,7 +342,7 @@
// to keep everything visible at the same time.
font-size: 50%;

@media (min-width: $device-desktop-min-width) {
@media (min-width: variables.$device-desktop-min-width) {
// On larger screens the above setting seems to be too small. The
// vertical width scaling will roughly make the 80-character lines
// fit the available width of the container.
Expand Down
Loading
Loading