Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ remove deprecated spacings and typography #1049

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion src/components/HdAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
$root: &;
display: flex;
padding: $sp-s;
@include font('text-small');
@include font('DS-150');
border-width: 1px;
border-style: solid;
border-radius: 3px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/HdTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {

.hd-table {
margin-top: $sp-s;
@include font('text-xsmall');
@include font('DS-150');
border-collapse: collapse;
width: 100%;
z-index: -1;
Expand Down
4 changes: 3 additions & 1 deletion src/components/HdToast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ $toastWidth: 288px;
border-radius: $default-border-radius;
border: 1px solid #e1e1e1;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.25);
@include font('xsheadline');
@include font('DS-90');
font-weight: 600;
color: $quaternary-color;

&--isOpen {
display: block;
Expand Down
3 changes: 2 additions & 1 deletion src/components/HdToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ $_controlIconSize: 32px;
border: 0;
background-color: transparent;
box-shadow: none;
@include font('subtitle');
@include font('DS-150');
font-weight: bold;
text-align: left;
transition: outline $time-s ease-in-out;

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/HdPasswordConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default {
visibility: visible;
}
&__text {
@include font('text-xxsmall');
@include font('DS-80');
color: getShade($quaternary-color, 80);
width: 65px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/HdRange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default {
position: absolute;
top: #{$sp-l + $sp-s};
transform: translateX(-50%);
@include font('text-xsmall');
@include font('DS-150');
color: getShade($quaternary-color, 80);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/HdTileSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $item-min-size: 100px;
$border-width: 1px;

.tile-select {
@include font('text-xsmall');
@include font('DS-150');

&__items {
display: grid;
Expand Down
4 changes: 2 additions & 2 deletions src/components/gallery/HdGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default {
padding-right: $sp-s;
padding-left: $sp-s;
background-color: rgba(0, 0, 0, 0.8);
@include font('text-xsmall');
@include font('DS-150');
font-weight: 600;
color: $white;
border-radius: 2px;
Expand Down Expand Up @@ -292,7 +292,7 @@ export default {
padding-right: $sp-s;
padding-left: $sp-s;
background-color: rgba(0, 0, 0, 0.8);
@include font('text-xsmall');
@include font('DS-150');
font-weight: 600;
color: $white;
border-radius: 2px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/gallery/HdGalleryCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default {
padding-right: $sp-s;
padding-left: $sp-s;
background-color: rgba(0, 0, 0, 0.8);
@include font('text-xsmall');
@include font('DS-150');
font-weight: 600;
color: $white;
border-radius: 2px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/gallery/HdGalleryTiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default {
right: $sp-m;
background-color: $primary-bg;
padding: $sp-s;
@include font('text-xsmall');
@include font('DS-150');
font-weight: bold;
border: 0;
border-radius: 4px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/gallery/HdZoomerGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
padding-right: $sp-s;
padding-left: $sp-s;
background-color: rgba(0, 0, 0, 0.8);
@include font('text-xsmall');
@include font('DS-150');
font-weight: 600;
color: $white;
border-radius: 2px;
Expand Down
12 changes: 9 additions & 3 deletions src/stories/Elevation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ export default {
margin-left: auto;

> h1 {
@include font('headline');
@include font('DS-300');
font-weight: 900;

@media (min-width: $break-tablet) {
@include font('DS-400');
}
}
> h3 {
@include font('title');
@include font('DS-200');
font-weight: 900;
margin-top: $sp-l;
}

Expand Down Expand Up @@ -95,7 +101,7 @@ export default {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@include font('text-xsmall');
@include font('DS-150');
}
}
</style>
3 changes: 2 additions & 1 deletion src/stories/Welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export default {
}

&__subtitle {
@include font('title');
@include font('DS-200');
font-weight: 900;
margin-top: $sp-l;
}

Expand Down
23 changes: 0 additions & 23 deletions src/styles/_deprecated_spacing.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import './colors';
@import './spacing';
@import './deprecated_spacing';

$default-border-radius: 2px;

Expand Down
Empty file added src/styles/deprecated_font
Empty file.
3 changes: 0 additions & 3 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
@import './typography';
@import './_variables';

@warn "Please use the new DS typography, the old one will be removed in the next major release. You can read more about it on https://bit.ly/3adOqgw. Ignore this warning if already done.";
@warn "Please use the new spacing variables, the old variables will be removed in the next major release. You can read more about it on https://bit.ly/2NZkZWS. Ignore this warning if already done.";

* {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
Expand Down
4 changes: 4 additions & 0 deletions src/styles/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
font-size: rem-calc(16);
line-height: 1.5;
}
@else if ($style == "DS-150") {
font-size: rem-calc(18);
line-height: 1.55;
}
@else if ($style == "DS-200") {
font-size: rem-calc(20);
line-height: 1.6;
Expand Down