Skip to content

Commit

Permalink
Remove all calc() / revert PLAY-1414 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kangaree committed Aug 29, 2024
1 parent e8c7fa5 commit 0437db1
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
left: $icon_size * 1.5;
}
&[class*=_left] [class^=pb_avatar_kit] {
padding-left: calc($icon_size / 2);
padding-left: $icon_size / 2;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions playbook/app/pb_kits/playbook/pb_badge/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
align-items: center;
justify-content: center;
border-radius: $border_rad_light;
padding: 0 calc($space_xs/2);
padding: 0 $space_xs/2;
border-width: 1px;
border-style: solid;
border-color: $card_light;
Expand All @@ -34,7 +34,7 @@
height: $pb_badge_height;
min-height: $pb_badge_height;
min-width: $pb_badge_height;
border-radius: calc($pb_badge_height / 2);
border-radius: $pb_badge_height / 2;
}

&[class*=_notification] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 calc($space_xs/2);
padding: 0 $space_xs/2;

svg {
margin-right: 8px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
&.error {
.date_picker_input_wrapper {
[class*=pb_body_kit] {
margin-top: calc($space_xs / 2);
margin-top: $space_xs / 2;
}

input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
width: 315.88px
}
.flatpickr-months {
margin-left: calc($space_xs / 4);
margin-top: calc($space_xs / 3);
margin-left: $space_xs / 4;
margin-top: $space_xs / 3;
}
}
@media (max-width: 499px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
display: flex;
align-items: center;
[class*=pb_date_range_inline_arrow] {
margin-left: calc($space_xs/2);
margin-right: calc($space_xs/2);
margin-left: $space_xs/2;
margin-right: $space_xs/2;
}
[class*=pb_date_range_inline_timezone] {
margin-left: calc($space_xs/2);
margin-left: $space_xs/2;
}
[class*=pb_date_range_inline_icon] {
margin-right: calc($space_xs/2);
margin-right: $space_xs/2;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[class^=pb_date_time_stacked] {

[class^=padding_month] {
padding-bottom: calc($space_xs + 2px) !important;
padding-bottom: $space_xs + 2px !important;
}

[class^=padding_day] {
padding-bottom: calc($space_xs + 2px) !important;
padding-bottom: $space_xs + 2px !important;
}

&[class*=_dark] {
Expand All @@ -19,7 +19,7 @@

}
.date-time-padding {
padding-right: calc($space_xs / 2);
padding-left: calc($space_xs / 2);
padding-right: $space_xs / 2;
padding-left: $space_xs / 2;
}

2 changes: 1 addition & 1 deletion playbook/app/pb_kits/playbook/pb_dropdown/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

&.error {
[class*=pb_body_kit] {
margin-top: calc($space_xs / 2);
margin-top: $space_xs / 2;
}

[class*="dropdown_trigger_wrapper"] {
Expand Down
4 changes: 2 additions & 2 deletions playbook/app/pb_kits/playbook/pb_form_pill/_form_pill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ $form_pill_colors: (
display: inline-flex;
justify-content: center;
align-items: center;
padding: 0 calc($space-md/2);
padding: 0 $space-md/2;
height: $pb_form_pill_height;
border-radius: calc($pb_form_pill_height/2);
border-radius: $pb_form_pill_height/2;
margin-bottom: 2px;
margin-top: 2px;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $pb_icon_circle_sizes: (
&[class*=_size_#{$name}] {
width: $size;
height: $size;
border-radius: calc($size/2);
border-radius: $size/2;
background: $silver;
color: $text_lt_light;
font-size: $size * 0.38;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

[class^=pb_label_value_kit] {
[class^=pb_caption_kit] {
margin-bottom: calc($space-xs/1.5);
margin-bottom: $space-xs/1.5;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

.message_text {
margin: 0 0 calc($space-xs/2);
margin: 0 0 $space-xs/2;
}

.message_title {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
justify-content: center;
width: $pb_multiple_users_size;
height: $pb_multiple_users_size;
border-radius: calc($pb_multiple_users_size/2) + 2;
border-radius: $pb_multiple_users_size / 2 + 2;
background: tint($primary, 90%);
border: $pb_multiple_users_border_size solid $white;
color: $primary;
Expand Down
6 changes: 3 additions & 3 deletions playbook/app/pb_kits/playbook/pb_passphrase/_passphrase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}

.passphrase-label {
margin-right: calc($space_xs/2);
margin-right: $space_xs / 2;
}

.passphrase-text-input-wrapper {
position: relative;

.pb_text_input_kit_label {
margin-bottom: calc($space_xs/2);
margin-bottom: $space_xs / 2;
}

.passphrase-text-input input {
Expand Down Expand Up @@ -57,7 +57,7 @@
}

.pb_progress_simple_wrapper, .pb_progress_simple_wrapper_dark {
margin-bottom: calc($space_xs/2);
margin-bottom: $space_xs/2;

&.progress-empty-input {
visibility: hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $flag-min-resolution: 192dpi;
}

.iti__arrow.iti__arrow--up::before {
transform: rotate(-calc($transform-rotate-deg / 3));
transform: rotate(-($transform-rotate-deg/3));
top: $space_xs + 4px;
color: $primary_action;
}
Expand Down
4 changes: 2 additions & 2 deletions playbook/app/pb_kits/playbook/pb_pill/_pill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ $pb_pill_height: 22px;
display: inline-flex;
justify-content: center;
align-items: center;
padding: 0 calc($space-sm/1.8);
padding: 0 $space-sm/1.8;
height: $pb_pill_height;
border-radius: calc($pb_pill_height/2);
border-radius: $pb_pill_height/2;
white-space: nowrap;

&[class*=lowercase] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $pb_progress_simple_height: 4px;
[class^=pb_progress_simple_kit] {
width: 100%;
height: $pb_progress_simple_height;
border-radius: calc($pb_progress_simple_height/2);
border-radius: $pb_progress_simple_height/2;
background: rgba($primary, $opacity-1);
&[class*=_positive] {
.progress_simple_value {
Expand All @@ -42,7 +42,7 @@ $pb_progress_simple_height: 4px;
[class^=progress_simple_value] {
width: 0%;
height: 100%;
border-radius: calc($pb_progress_simple_height/2);
border-radius: $pb_progress_simple_height/2;
background: $primary;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
.trix-button--icon {
height: $space_lg;
width: $space_lg;
margin: calc($space_xs / 2);
margin: $space_xs / 2;
border-radius: $border_rad_heavier;
&::before {
background-size: auto;
Expand All @@ -116,7 +116,7 @@
background: $white;
border: 1px solid #E4E8F0;
border-bottom: none;
padding: calc($space_xs / 2);
padding: $space_xs / 2;
border-top-left-radius: $border_rad_heavier;
border-top-right-radius: $border_rad_heavier;
.trix-button-group {
Expand Down
2 changes: 1 addition & 1 deletion playbook/app/pb_kits/playbook/pb_select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
display: block;
&.error {
[class*=pb_body_kit] {
margin-top: calc($space_xs / 2);
margin-top: $space_xs / 2;
}
> select:first-child {
border-color: $error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $pb_selectable_card_border: 2px;
align-items: center;
height: $pb_selectable_card_indicator_size;
width: $pb_selectable_card_indicator_size;
border-radius: calc($pb_selectable_card_indicator_size/2) + calc($pb_selectable_card_border/2);
border-radius: $pb_selectable_card_indicator_size/2 + $pb_selectable_card_border/2;
border-width: $pb_selectable_card_border;
border-style: solid;
border-color: $white;
Expand All @@ -52,8 +52,8 @@ $pb_selectable_card_border: 2px;
font-size: $font_smaller;
text-align: center;
position: absolute;
top: -calc($pb_selectable_card_indicator_size/2);
right: -calc($pb_selectable_card_indicator_size/2);
top: -($pb_selectable_card_indicator_size/2);
right: -($pb_selectable_card_indicator_size/2);
opacity: 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
&.error {
.text_input_wrapper {
[class*="pb_body_kit"] {
margin-top: calc($space_xs / 2);
margin-top: $space_xs / 2;
}
input,
.text_input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
display: flex;
align-items: center;
[class*=pb_time_range_inline_arrow] {
margin-left: calc($space_xs/2);
margin-right: calc($space_xs/2);
margin-left: $space_xs/2;
margin-right: $space_xs/2;
}
[class*=pb_time_range_inline_timezone] {
margin-left: calc($space_xs/2);
margin-left: $space_xs/2;
}
[class*=pb_time_range_inline_icon] {
margin-right: calc($space_xs/2);
margin-right: $space_xs/2;
}
}
}
4 changes: 2 additions & 2 deletions playbook/app/pb_kits/playbook/pb_toggle/_toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $transition: .2s ease-in-out;
&:after {
transition: $transition;
content: "";
width: calc($width / 2) - 4px;
width: $width / 2 - 4px;
height: $height - 4px;
background-color: $color_checkbox_default;
border-radius: 50%;
Expand Down Expand Up @@ -68,7 +68,7 @@ $transition: .2s ease-in-out;
background-color: $color_checkbox_success;

&:after {
left: calc($width / 2) + 2px;
left: $width / 2 + 2px;
background-color: $white;
}
}
Expand Down

0 comments on commit 0437db1

Please sign in to comment.