Skip to content

Commit

Permalink
feat(components/styles)!: remove @include set-font-face() inside co…
Browse files Browse the repository at this point in the history
…mponents (#1181)

Resolves #1122
  • Loading branch information
tiloyi committed Sep 26, 2022
1 parent 0faa0d2 commit 21a5c1a
Show file tree
Hide file tree
Showing 298 changed files with 960 additions and 411 deletions.
1 change: 0 additions & 1 deletion packages/styles/components/_c.accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
background-color: $color-grey-000;
border-bottom: get-border(s) solid $color-font-light;

@include set-font-face();
@include set-accordion-size($accordion-default-size, $parent);

// TODO:
Expand Down
8 changes: 4 additions & 4 deletions packages/styles/components/_c.badge.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* mqp:start */
.mc-badge {
@include set-badge-base();
@include set-font-face('semi-bold');
@include set-font-scale('04', 's');
@include set-badge-theme(get-token(color, badge, 'info'));
@include set-font-weight("semi-bold");
@include set-font-scale("04", "s");
@include set-badge-theme(get-token(color, badge, "info"));

@each $name, $props in $badges {
@if ($name != 'info') {
@if ($name != "info") {
&--#{$name} {
@include set-badge-theme($props);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/components/_c.button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.mc-button {
@include unstyle-button();
@include set-button-theme(get-token(color, button, "solid"), true);
@include set-font-face("semi-bold");
@include set-font-weight("semi-bold");
@include set-button-size($button-medium);
@include set-button-layout();

Expand Down
3 changes: 1 addition & 2 deletions packages/styles/components/_c.dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
&__trigger {
@include unstyle-button();
@include set-select-size($select-default-size);
@include set-font-face();

display: flex;
width: 18rem;
Expand All @@ -16,7 +15,7 @@
padding-left: $mu075;

&.is-open {
background-image: url(inline-icons('arrow-top-16', $color-grey-999));
background-image: url(inline-icons("arrow-top-16", $color-grey-999));
}

&:disabled {
Expand Down
33 changes: 12 additions & 21 deletions packages/styles/components/_c.file-uploader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

&__label {
@include set-font-face("semi-bold");
@include set-font-weight("semi-bold");
@include set-button-layout();
@include set-button-size(map-get($button-sizes, "m"));
@include set-button-theme(get-token(color, button, "bordered"));
Expand All @@ -25,8 +25,7 @@
height: $mu150;
display: flex;
align-items: center;
background:
transparent
background: transparent
url(inline-icons("upload-24", $color-button-bordered-border)) no-repeat;
background-size: $mu150;
margin-right: $mu050;
Expand Down Expand Up @@ -57,8 +56,7 @@
cursor: not-allowed;

&::before {
background:
transparent
background: transparent
url(inline-icons("upload-24", $color-button-bordered-disabled-font))
no-repeat;
}
Expand All @@ -73,8 +71,6 @@
}

&__file {
@include set-font-face("regular");

align-items: center;
background: $color-fileuploader-files-list;
color: $color-fileuploader-font;
Expand Down Expand Up @@ -110,21 +106,17 @@
}

&--is-valid &-icon {
background-image:
url(
inline-icons(
"valid-24",
$color-fileuploader-valid
));
background-image: url(inline-icons(
"valid-24",
$color-fileuploader-valid
));
}

&--is-invalid &-icon {
background-image:
url(
inline-icons(
"alert-24",
$color-fileuploader-alert
));
background-image: url(inline-icons(
"alert-24",
$color-fileuploader-alert
));
}

&--is-invalid &-message {
Expand Down Expand Up @@ -155,8 +147,7 @@
content: "";
width: $mu150;
height: $mu150;
background:
transparent
background: transparent
url(inline-icons("delete-24", $color-fileuploader-font)) no-repeat;
display: block;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/components/_c.flag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$parent: get-parent-selector(&);

@include set-flag-base($parent);
@include set-font-face("semi-bold");
@include set-font-weight("semi-bold");
@include set-flag-theme($parent, get-token(color, flag, "solid"));

@each $name, $props in $flags {
Expand Down
1 change: 0 additions & 1 deletion packages/styles/components/_c.layer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.mc-layer {
$parent: get-parent-selector(&);

@include set-font-face();
@include set-dialog-base();

display: flex;
Expand Down
1 change: 0 additions & 1 deletion packages/styles/components/_c.modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.mc-modal {
$parent: get-parent-selector(&);

@include set-font-face();
@include set-dialog-base();

align-items: flex-end;
Expand Down
25 changes: 12 additions & 13 deletions packages/styles/components/_c.notification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
.mc-notification {
$parent: get-parent-selector(&);

@include set-font-face();
@include set-border-radius();
@include set-flexy();
@include set-notification-size($notification-default-size);
@include set-notification-type('information');
@include set-notification-type("information");

box-sizing: border-box;
color: $color-font-darkest;

&::before {
background-color: transparent;
background-repeat: no-repeat;
content: '';
content: "";
display: block;
}

Expand All @@ -29,12 +28,12 @@
}

&__title {
@include set-font-face('semi-bold');
@include set-font-scale('05');
@include set-font-weight("semi-bold");
@include set-font-scale("05");
}

&__message {
@include set-font-scale('04');
@include set-font-scale("04");
}

&__footer {
Expand All @@ -43,14 +42,14 @@
flex-direction: column;
margin-top: $mu100;

@include set-from-screen('l') {
@include set-from-screen("l") {
flex-direction: row;
}
}

// TODO: to be removed later
&__link {
@include set-font-scale('04', 'm');
@include set-font-scale("04", "m");

margin-top: $mu050;
}
Expand All @@ -59,7 +58,7 @@
&:not(:first-child) {
margin-top: $mu100;

@include set-from-screen('l') {
@include set-from-screen("l") {
margin: {
top: 0;
left: $mu100;
Expand All @@ -78,16 +77,16 @@
// Notification size
@each $size, $props in $notification-sizes {
&--#{$size} {
@if ($size != 'm') {
@if ($size != "m") {
@include set-notification-size($props);

@each $type, $props in $notification-types {
@if ($type != 'information') {
@if ($type != "information") {
&#{$parent}--#{$type} {
@include set-notification-type($type, $size);
}
} @else {
@include set-notification-type('information', $size);
@include set-notification-type("information", $size);
}
}
}
Expand All @@ -102,7 +101,7 @@
@include set-focus-floating-base;

background: transparent
url(inline-icons('cross-16', $notification-close-icon-color)) no-repeat;
url(inline-icons("cross-16", $notification-close-icon-color)) no-repeat;
border: 0;
cursor: pointer;
display: block;
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/components/_c.option-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

&__label {
@include set-font-face("semi-bold");
@include set-font-weight("semi-bold");

position: relative;
padding: magic-unit-rem(1.5625, true) $mu200; // 25px 32px
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/components/_c.password-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

&__button {
@include unstyle-button();
@include set-font-face("semi-bold");
@include set-font-weight("semi-bold");

background-color: $color-input-background;
border: get-border("s") solid $color-input-border;
Expand Down
1 change: 0 additions & 1 deletion packages/styles/components/_c.tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
}

&__link {
@include set-font-face();
@include set-font-scale("05", "s");

@include set-focus-floating-base {
Expand Down
1 change: 0 additions & 1 deletion packages/styles/settings-tools/_s.tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ $tag-sizes: (
}

@mixin set-tag-base-style($size) {
@include set-font-face("regular");
@include set-tag-size($size);

display: inline-flex;
Expand Down
3 changes: 1 addition & 2 deletions packages/styles/settings-tools/_t.reset-forms.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@mixin reset-input {
@include set-font-face("regular");

font-family: inherit;
box-sizing: border-box;
outline: none;
appearance: none;
Expand Down
24 changes: 12 additions & 12 deletions packages/styles/typography/_t.bodys.scss
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
/* mqp:start */
.mt-body {
&-l {
@include set-font-face('regular');
@include set-font-scale('06');
@include set-font-face("regular");
@include set-font-scale("06");

&--line-height-m {
@include set-line-height('06', 'm');
@include set-line-height("06", "m");
}

&--semi-bold {
@include set-font-face('semi-bold');
@include set-font-face("semi-bold");
}
}

&-m {
@include set-font-face('regular');
@include set-font-scale('05');
@include set-font-face("regular");
@include set-font-scale("05");

&--line-height-m {
@include set-line-height('05', 'm');
@include set-line-height("05", "m");
}

&--semi-bold {
@include set-font-face('semi-bold');
@include set-font-face("semi-bold");
}
}

&-s {
@include set-font-face('regular');
@include set-font-scale('04');
@include set-font-face("regular");
@include set-font-scale("04");

&--line-height-m {
@include set-line-height('04', 'm');
@include set-line-height("04", "m");
}

&--semi-bold {
@include set-font-face('semi-bold');
@include set-font-face("semi-bold");
}
}
}
Expand Down
17 changes: 7 additions & 10 deletions packages/styles/typography/_t.headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
.mt-heading {
$parent: get-parent-selector(&, ".mt-");

@include set-font-face("regular");

color: $color-font-darkest;
display: block;
margin-bottom: $mu200;
Expand All @@ -14,22 +12,21 @@
content: "";
display: block;
height: $mu025;
background-color: $color-heading-underline-default;
background-color: $color-primary-01-500;
}

// underline color variations

&--line-primary-01-200::after,
&--line-lightest::after {
background-color: $color-heading-underline-lightest;
&--line-primary-02-600::after {
background-color: $color-primary-02-600;
}

&--line-primary-02-200::after {
background-color: $color-primary-02-200;
&--line-primary-01-200::after {
background-color: $color-primary-01-200;
}

&--line-primary-02-600::after {
background-color: $color-primary-02-600;
&--line-primary-02-200::after {
background-color: $color-primary-02-200;
}

// text alignment
Expand Down
Loading

0 comments on commit 21a5c1a

Please sign in to comment.