Skip to content

Commit

Permalink
refactor: remove style duplication in my account route components
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszherba committed Jul 27, 2022
1 parent aa47add commit 82cf938
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.message {
font-family: var(--font-family--primary);
line-height: 1.6;
font-size: var(--font-size--base);
margin: 0 0 var(--spacer-base);
}
@import "../../styles/shared.scss";
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,5 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.message {
font-family: var(--font-family--primary);
line-height: 1.6;
font-size: var(--font-size--base);
margin: 0 0 var(--spacer-base);
}
@import "../../styles/shared.scss";
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,7 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.message {
font-family: var(--font-family--primary);
line-height: 1.6;
font-size: var(--font-size--base);
margin: 0 0 var(--spacer-base);
}
@import "../../styles/shared.scss";
.addresses-list {
margin-bottom: var(--spacer-base);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@ export default defineComponent({
</script>

<style lang='scss' scoped>
.tab-orphan {
@include for-mobile {
--tabs-title-display: none;
--tabs-content-padding: 0;
--tabs-conent-border-width: 0;
}
}
@import '../styles/shared.scss';
.form {
&__element {
Expand Down
27 changes: 2 additions & 25 deletions packages/theme/modules/customer/pages/MyAccount/MyReviews.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
@import '../styles/shared.scss';
.no-reviews {
&__title {
margin: 0 0 var(--spacer-lg) 0;
Expand All @@ -98,31 +100,6 @@ export default defineComponent({
}
}
.tab-orphan {
@include for-mobile {
--tabs-title-display: none;
--tabs-content-padding: 0;
--tabs-conent-border-width: 0;
}
}
.message {
margin: 0 0 var(--spacer-2xl) 0;
font: var(--font-weight--light) var(--font-size--base) / 1.6
var(--font-family--primary);
&__link {
color: var(--c-primary);
--link-weight: var(--font-weight--medium);
--link-font-family: var(--font-family--primary);
--link-font-size: var(--font-size--base);
text-decoration: none;
&:hover {
color: var(--c-text);
}
}
}
.sf-review__rating {
width: 100%;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,7 @@ export default defineComponent({
</script>

<style lang="scss" scoped>
.tab-orphan {
@include for-mobile {
--tabs-title-display: none;
--tabs-content-padding: 0;
--tabs-conent-border-width: 0;
}
}
@import '../styles/shared.scss';
.main {
&.section {
Expand Down Expand Up @@ -459,7 +453,6 @@ export default defineComponent({
}
&__product-card {
--product-card-title-margin: var(--spacer-base) 0 0 0;
--product-card-title-font-weight: var(--font-weight--medium);
--product-card-title-margin: var(--spacer-xs) 0 0 0;
flex: 1 1 50%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export default defineComponent({
margin: 0 0 var(--spacer-xl) 0;
}
}
.action {
display: flex;
align-items: center;
Expand All @@ -242,12 +243,15 @@ export default defineComponent({
margin: 0 0 0 var(--spacer-xs);
}
}
.action {
margin: var(--spacer-xl) 0 var(--spacer-xl) 0;
}
.checkbox {
margin-bottom: var(--spacer-2xl);
}
.bottom {
text-align: center;
margin-bottom: var(--spacer-lg);
Expand Down
26 changes: 26 additions & 0 deletions packages/theme/modules/customer/pages/styles/shared.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.tab-orphan {
@include for-mobile {
--tabs-title-display: none;
--tabs-content-padding: 0;
--tabs-conent-border-width: 0;
}
}

.message {
font-family: var(--font-family--primary);
line-height: 1.6;
font-size: var(--font-size--base);
margin: 0 0 var(--spacer-base);

&__link {
color: var(--c-primary);
--link-weight: var(--font-weight--medium);
--link-font-family: var(--font-family--primary);
--link-font-size: var(--font-size--base);
text-decoration: none;

&:hover {
color: var(--c-text);
}
}
}

0 comments on commit 82cf938

Please sign in to comment.