Skip to content

Commit

Permalink
feat(daffio): update theming and utilities module implementation (#2181)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed May 15, 2023
1 parent d6bfc05 commit 0ef4921
Show file tree
Hide file tree
Showing 28 changed files with 142 additions and 165 deletions.
12 changes: 6 additions & 6 deletions apps/daffio/src/app/api/components/api-list/api-list-theme.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@use 'daffio-theme' as theme;
@use 'theme' as daff-theme;

@mixin daffio-api-list-theme($theme) {
$gray: theme.daff-map-deep-get($theme, 'core.gray');
$base: theme.daff-map-deep-get($theme, "core.base");
$base-contrast: theme.daff-map-deep-get($theme, "core.base-contrast");
$gray: daff-theme.daff-map-deep-get($theme, 'core.gray');
$base: daff-theme.daff-map-deep-get($theme, "core.base");
$base-contrast: daff-theme.daff-map-deep-get($theme, "core.base-contrast");

.daffio-api-list {
&__package-name {
Expand All @@ -16,7 +16,7 @@
}

&:hover {
color: theme.daff-illuminate($base-contrast, $gray, 3);
color: daff-theme.daff-illuminate($base-contrast, $gray, 3);
}
}

Expand All @@ -27,7 +27,7 @@
}

&:hover {
background: theme.daff-illuminate($base, $gray, 2);
background: daff-theme.daff-illuminate($base, $gray, 2);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '../../../../scss/type-descriptors/mixins' as type-mixin;
@import 'utilities';
@use 'utilities' as daff;

:host {
display: flex;
Expand Down Expand Up @@ -27,15 +27,15 @@
line-height: 1.375rem;
margin: 0 0 24px;

@include breakpoint(mobile) {
@include daff.breakpoint(mobile) {
font-size: 1.25rem;
line-height: 1.75rem;
}

> * {
@include single-line-ellipsis();
@include daff.single-line-ellipsis();

@include breakpoint(mobile) {
@include daff.breakpoint(mobile) {
display: inline-block;
}
}
Expand All @@ -46,11 +46,11 @@
grid-template-columns: 1fr;
grid-gap: 8px 24px;

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
grid-template-columns: repeat(2, 1fr);
}

@include breakpoint(small-laptop) {
@include daff.breakpoint(small-laptop) {
grid-template-columns: repeat(3, 1fr);
}
}
Expand All @@ -66,7 +66,7 @@
}

&__item-name {
@include single-line-ellipsis();
@include daff.single-line-ellipsis();
}

&__item-label {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@import 'utilities';
@use 'utilities' as daff;

:host {
display: block;
padding: 48px 24px;

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
padding: 48px;
}
}

.daffio-api-list-page {
&__title {
@include headline-xl();
@include daff.headline-xl();
margin-bottom: 48px;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-home-callout-platforms {
Expand All @@ -9,7 +9,7 @@
grid-gap: 24px;
justify-content: center;

@include breakpoint(mobile) {
@include daff.breakpoint(mobile) {
grid-template-columns: 144px 144px;
grid-template-areas: 'magento shopify';
grid-gap: 48px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-home-callout-pwa {
Expand All @@ -22,7 +22,7 @@
'd';
grid-gap: 16px;

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
grid-template-columns: 1fr 1fr;
grid-template-areas:
'a b'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@import 'utilities';
@use 'utilities' as daff;

:host {
display: block;
overflow: hidden;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
height: calc(100vh - 64px);
}

@include breakpoint(desktop) {
@include daff.breakpoint(desktop) {
height: 80vh;
}
}
Expand All @@ -22,14 +22,14 @@
'content';
position: relative;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
grid-template-columns: 560px 1fr;
grid-template-areas:
'content illustration';
grid-gap: 48px;
}

@include breakpoint(small-laptop) {
@include daff.breakpoint(small-laptop) {
grid-template-columns: 560px 1fr;
grid-template-areas:
'content illustration';
Expand All @@ -47,15 +47,15 @@
display: none;
grid-area: illustration;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
display: block;
position: absolute;
right: -288px;
top: -40px;
width: 736px;
}

@include breakpoint(desktop) {
@include daff.breakpoint(desktop) {
top: -60px;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-support {
Expand All @@ -11,7 +11,7 @@
grid-template-columns: 1fr;
grid-gap: 16px;

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
grid-template-columns: 1fr 1fr;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
@use 'sass:map';
@use 'daffio-theme' as theme;
@use 'theme' as daff-theme;

@mixin daffio-feature-comparison-theme($theme){
$secondary: map.get($theme, secondary);
$base: theme.daff-map-deep-get($theme, "core.base");
$base-contrast: theme.daff-map-deep-get($theme, "core.base-contrast");
$base: daff-theme.daff-map-deep-get($theme, "core.base");
$base-contrast: daff-theme.daff-map-deep-get($theme, "core.base-contrast");

.feature-comparison {
background: $base;
box-shadow: 0 0 30px 0 rgba($base-contrast, 0.05);

> * {
&:nth-child(4n-2) {
background: theme.daff-color($secondary);
color: theme.daff-text-contrast(theme.daff-color($secondary));
background: daff-theme.daff-color($secondary);
color: daff-theme.daff-text-contrast(daff-theme.daff-color($secondary));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

@mixin comparison-cell {
display: flex;
Expand All @@ -16,22 +16,22 @@
align-items: flex-start;
font-size: 0.75rem;
padding: 15px 5px;
@include embolden();
@include uppercase();
@include daff.embolden();
@include daff.uppercase();

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
padding: 25px 5px;
font-size: $small-font-size;
font-size: daff.$small-font-size;
}
}

&__cell {
@include comparison-cell();
align-items: center;
font-size: $small-font-size;
font-size: daff.$small-font-size;
padding: 10px 15px;

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
font-size: 1rem;
padding: 15px 25px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-why-pwa-examples {
Expand All @@ -7,7 +7,7 @@
grid-template-columns: 1fr;
grid-gap: 24px;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 24px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-why-pwa-overview {
Expand All @@ -12,15 +12,15 @@
'd';
grid-gap: 16px;

@include breakpoint(mobile) {
@include daff.breakpoint(mobile) {
grid-template-columns: 1fr 1fr;
grid-template-areas:
'a b'
'c d';
grid-gap: 16px;
}

@include breakpoint(tablet) {
@include daff.breakpoint(tablet) {
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-areas: 'a b c d';
grid-gap: 16px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-why-pwa-solution {
Expand All @@ -11,7 +11,7 @@
grid-gap: 48px;
align-items: center;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
grid-template-columns: 2fr 1fr;
grid-template-areas: 'feature-comparison list';
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'utilities';
@use 'utilities' as daff;

/* autoprefixer grid: autoplace */ /* stylelint-disable-line scss/comment-no-loud */
.daffio-why-pwa-stats {
Expand All @@ -10,7 +10,7 @@
'b';
grid-gap: 24px;

@include breakpoint(big-tablet) {
@include daff.breakpoint(big-tablet) {
grid-template-columns: 1fr 1fr;
grid-template-areas: 'a b';
grid-gap: 24px;
Expand Down
Loading

0 comments on commit 0ef4921

Please sign in to comment.