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
10 changes: 5 additions & 5 deletions src/components/Button/Button.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@import '../../styles/common';

$min-height: control-height();
$vertical-padding: ($min-height - line-height(body) - rem(2px)) / 2;
$slim-min-height: rem(28px);
$slim-vertical-padding: ($slim-min-height - line-height(body) - rem(2px)) / 2;
$large-min-height: rem(44px);
$large-vertical-padding: ($large-min-height - line-height(body) - rem(2px)) / 2;
$vertical-padding: ($min-height - line-height(body) - 2px) / 2;
$slim-min-height: 28px;
$slim-vertical-padding: ($slim-min-height - line-height(body) - 2px) / 2;
$large-min-height: 44px;
$large-vertical-padding: ($large-min-height - line-height(body) - 2px) / 2;
$spinner-size: 20px;

$partial-button-filled-pressed-box-shadow: inset 0 0 0 0 transparent,
Expand Down
3 changes: 1 addition & 2 deletions src/components/CheckableButton/CheckableButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

$button-min-height: control-height();

$button-vertical-padding: ($button-min-height - line-height(body) - rem(2px)) /
2;
$button-vertical-padding: ($button-min-height - line-height(body) - 2px) / 2;

.CheckableButton {
@include text-style-button;
Expand Down
4 changes: 2 additions & 2 deletions src/components/DropZone/components/FileUpload/FileUpload.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import '../../../../styles/common';

$fileupload-padding: 15px;
$slim-min-height: rem(30px);
$slim-vertical-padding: ($slim-min-height - line-height(body) - rem(2px)) / 2;
$slim-min-height: 30px;
$slim-vertical-padding: ($slim-min-height - line-height(body) - 2px) / 2;

.FileUpload {
padding: $fileupload-padding;
Expand Down
8 changes: 4 additions & 4 deletions src/components/IndexTable/components/Checkbox/Checkbox.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../../../styles/common';

$expanded-height: rem(32px);
$expanded-width: rem(32px);
$condensed-height: rem(44px);
$condensed-width: rem(50px);
$expanded-height: 32px;
$expanded-width: 32px;
$condensed-height: 44px;
$condensed-width: 50px;

.TableCellContentContainer {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Indicator/Indicator.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../styles/common';

$size: rem(10px);
$base-position: rem(-4px);
$size: 10px;
$base-position: -4px;

.Indicator {
&::before,
Expand Down
4 changes: 2 additions & 2 deletions src/components/KeyboardKey/KeyboardKey.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../../styles/common';

$key-base-height: rem(24px);
$key-base-height: 24px;

.KeyboardKey {
--p-bottom-shadow-size: 2px;
Expand All @@ -14,7 +14,7 @@ $key-base-height: rem(24px);
0 var(--p-bottom-shadow-size) 0 1px var(--p-border-subdued);
border-radius: var(--p-border-radius-base);
font-family: font-family();
font-size: rem(12px);
font-size: 12px;
font-weight: var(--p-font-weight-medium);
line-height: $key-base-height;
color: var(--p-text-subdued);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $relative-size: $primary-basis / $secondary-basis;

@media print {
body & {
font-size: rem(11px);
line-height: rem(16px);
font-size: 11px;
line-height: 16px;
}

a,
Expand Down
8 changes: 4 additions & 4 deletions src/components/Link/Link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
position: absolute;
z-index: -1;
// this mimics the box model of the plain button backdrop
top: rem(-2px);
right: rem(-5px);
bottom: rem(-2px);
left: rem(-5px);
top: -2px;
right: -5px;
bottom: -2px;
left: -5px;
display: block;

border-radius: border-radius();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Listbox/components/Loading/Loading.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../../../../styles/common';

$item-min-height: rem(40px);
$item-min-height: 40px;

.ListItem {
padding: 0;
Expand Down
6 changes: 3 additions & 3 deletions src/components/MessageIndicator/MessageIndicator.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../styles/common';

$indicator-size: rem(12px);
$indicator-position: rem(-3px);
$indicator-size: 12px;
$indicator-position: -3px;

.MessageIndicatorWrapper {
position: relative;
Expand All @@ -16,5 +16,5 @@ $indicator-position: rem(-3px);
height: $indicator-size;
border-radius: 100%;
background-color: var(--p-icon-highlight);
border: solid rem(2px) var(--p-background);
border: solid 2px var(--p-background);
}
2 changes: 1 addition & 1 deletion src/components/Modal/Modal.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../../styles/common';

$small-width: rem(620px);
$small-width: 620px;

.BodyWrapper {
display: flex;
Expand Down
10 changes: 5 additions & 5 deletions src/components/Modal/components/Dialog/Dialog.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@import '../../../../styles/common';

$top-offset-slide-in-start: rem(200px);
$top-offset-slide-in-start: 200px;
$vertical-spacing: 60px;
$height-limit: 600px;
$xsmall-width: rem(380px);
$small-width: rem(620px);
$large-width: rem(980px);
$xsmall-width: 380px;
$small-width: 620px;
$large-width: 980px;
// @TODO simplify media queries so this isn't needed
$dangerous-magic-space-16: rem(64px);
$dangerous-magic-space-16: 64px;

.Container {
position: fixed;
Expand Down
22 changes: 11 additions & 11 deletions src/components/Navigation/Navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
@import './variables';

// Base Navigation styles
$active-indicator-width: rem(3px);
$nav-max-width: rem(360px);
$active-indicator-width: 3px;
$nav-max-width: 360px;

.Navigation {
--icon-size: #{rem(20px)};
--icon-size: 20px;
display: flex;
flex-direction: column;
align-items: stretch;
Expand Down Expand Up @@ -56,7 +56,7 @@ $nav-max-width: rem(360px);
}

@include breakpoint-after(nav-min-window-corrected()) {
padding-top: rem(12px);
padding-top: 12px;
}
}

Expand Down Expand Up @@ -239,7 +239,7 @@ $disabled-fade: 0.6;
}

// Secondary styles
$secondary-item-font-size: rem(15px);
$secondary-item-font-size: 15px;
.SecondaryNavigation {
flex-basis: 100%;
margin-left: 0;
Expand Down Expand Up @@ -282,14 +282,14 @@ $secondary-item-font-size: rem(15px);

@include breakpoint-after(nav-min-window-corrected()) {
font-size: $item-font-size-small;
line-height: rem(28px);
line-height: 28px;
}
}

.Text {
margin-top: rem(6px);
margin-bottom: rem(6px);
line-height: rem(20px);
margin-top: 6px;
margin-bottom: 6px;
line-height: 20px;
}

.Item-selected {
Expand Down Expand Up @@ -438,8 +438,8 @@ $secondary-item-font-size: rem(15px);
.Indicator {
position: relative;
display: inline-block;
height: rem(10px);
width: rem(10px);
height: 10px;
width: 10px;
}

.SecondaryNavigation-noIcon .Item {
Expand Down
26 changes: 13 additions & 13 deletions src/components/Navigation/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
$item-font-size: rem(16px);
$item-font-size-small: rem(14px);
$item-line-height-small: rem(32px);
$item-line-height-large: rem(36px);
$text-line-height: rem(20px);
$item-font-size: 16px;
$item-font-size-small: 14px;
$item-line-height-small: 32px;
$item-line-height-large: 36px;
$text-line-height: 20px;
$nav-variables: (
mobile-spacing: rem(10px),
desktop-spacing: rem(6px),
mobile-height: rem(40px),
desktop-height: rem(32px),
icon-size: rem(20px),
item-line-height: rem(40px),
mobile-spacing: 10px,
desktop-spacing: 6px,
mobile-height: 40px,
desktop-height: 32px,
icon-size: 20px,
item-line-height: 40px,
);
@function nav($variable) {
@return map-get($nav-variables, $variable);
Expand Down Expand Up @@ -152,8 +152,8 @@ $nav-animation-variables: (
}

@include breakpoint-before(nav-min-window-corrected()) {
font-size: rem(15px);
line-height: rem(19px);
font-size: 15px;
line-height: 19px;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionList/components/Option/Option.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import '../../../../styles/shared/typography';

$min-height: control-height();
$control-vertical-adjustment: rem(2px);
$control-vertical-adjustment: 2px;

.Option {
@include unstyled-button;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Page/Page.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../../styles/common';

$navigation-elements-height: rem(36px);
$navigation-elements-height: 36px;
$title-height: line-height(display-large, large-screen);
$stacking-order: (
title: 10,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Page/components/Header/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $button-style-breakpoint: 768px;
$medium-layout: 860px;
$desktop-layout: 1080px;
$individual-action-padding-x: calc(1.5 * var(--p-space-2));
$action-menu-rollup-computed-width: rem(40px);
$action-menu-rollup-computed-width: 40px;

.Header {
@include page-header-layout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.Title {
@include text-breakword;
@include text-emphasis-strong;
font-size: rem(24px);
line-height: rem(28px);
font-size: 24px;
line-height: 28px;

@include when-typography-not-condensed {
font-size: rem(20px);
font-size: 20px;
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/components/Popover/Popover.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@import '../../styles/common';

$arrow-size: rem(14px);
$visible-portion-of-arrow: rem(5px);
$content-max-height: rem(500px);
$content-max-width: rem(400px);
$vertical-motion-offset: rem(-5px);
$arrow-size: 14px;
$visible-portion-of-arrow: 5px;
$content-max-height: 500px;
$content-max-width: 400px;
$vertical-motion-offset: -5px;

.Popover {
max-width: calc(100vw - 2 * var(--p-space-4));
Expand Down
6 changes: 3 additions & 3 deletions src/components/ProgressBar/ProgressBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@function progress-bar-height($height: base) {
$base: 16px;
$data: (
small: rem($base / 2),
base: rem($base),
large: rem($base * 2),
small: $base / 2,
base: $base,
large: $base * 2,
);

@return map-get($data, $height);
Expand Down
2 changes: 1 addition & 1 deletion src/components/RadioButton/RadioButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
transform var(--p-duration-100) var(--p-ease);

@media (forced-colors: active) {
@include high-contrast-border(rem(5px));
@include high-contrast-border(5px);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/RangeSlider/RangeSlider.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$range-track-height: rem(4px);
$range-track-height: 4px;
$range-thumb-size: var(--p-range-slider-thumb-size-base);

@mixin track-dashed {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../../../styles/common';
@import '../../RangeSlider';

$range-wrapper: rem(28px);
$range-wrapper: 28px;

$range-thumb-border-error: rem(2px) solid var(--p-border-critical);
$range-thumb-border-error: 2px solid var(--p-border-critical);

.Wrapper {
--pc-input: 10;
Expand Down Expand Up @@ -105,8 +105,8 @@ $range-thumb-border-error: rem(2px) solid var(--p-border-critical);
}
}

$range-output-size: rem(32px);
$range-output-spacing: rem(16px);
$range-output-size: 32px;
$range-output-spacing: 16px;

.Prefix {
flex: 0 0 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
&:focus {
@include range-thumb-selectors {
border-color: var(--p-surface);
box-shadow: 0 0 0 rem(2px) var(--p-focused);
box-shadow: 0 0 0 2px var(--p-focused);
}

@include high-contrast-outline;
Expand Down Expand Up @@ -155,12 +155,12 @@
}

/// Output value indicator
$range-output-size: rem(32px);
$range-output-size: 32px;
$range-output-translate-x: calc(
-50% + var(--Polaris-RangeSlider-output-factor) * #{$range-thumb-size}
);

$range-output-spacing: rem(16px);
$range-output-spacing: 16px;

.Output {
position: absolute;
Expand Down
Loading