Skip to content

Commit

Permalink
remove @import and other deprecated sass stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Jan 15, 2025
1 parent e245338 commit b5ce031
Show file tree
Hide file tree
Showing 90 changed files with 1,018 additions and 940 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../pastanaga-angular/src/styles/variables' as *;

:host {
pa-side-nav ::ng-deep .pa-side-nav {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../pastanaga-angular/src/styles/variables' as *;

pa-demo-page {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.avatar-row {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.section-title {
margin: rhythm(4) 0 rhythm(2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

$grid-gap: rhythm(2);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.chip-container {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.open-modal-button {
margin-bottom: rhythm(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../../pastanaga-angular/src/styles/variables' as *;

:host {
background-color: $color-light-stronger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.distribute-example-container {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.example-container {
background-color: $color-tertiary-lighter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

hr {
margin: rhythm(4) 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

[class^='grid-'] > div {
background-color: $color-tertiary-regular;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../../pastanaga-angular/src/styles/variables' as *;

.content {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.open-modal-button {
margin-bottom: rhythm(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.grid-7 {
background-color: $color-neutral-lightest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.container {
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.examples,
form {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../../pastanaga-angular/src/styles/variables' as *;

.pa-demo-card {
border-bottom: 1px solid $color-neutral-lightest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../../pastanaga-angular/src/styles/variables' as *;

:host {
background-color: $color-light-stronger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.tab-example-container {
--tab-parent-background: transparent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../../../pastanaga-angular/src/styles/variables';
@use '../../../../../../pastanaga-angular/src/styles/variables' as *;

.typography-table > div:not(.separator) {
padding: rhythm(1);
Expand Down
16 changes: 8 additions & 8 deletions projects/demo/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$font-path: '../../assets/fonts';
@import '../../pastanaga-angular/src/styles/core';
@import '../../pastanaga-angular/src/styles/grid';
@import '../../pastanaga-angular/src/styles/theme/fonts';
@use '../../pastanaga-angular/src/styles/core';
@use '../../pastanaga-angular/src/styles/grid';
@use '../../pastanaga-angular/src/styles/theme/fonts';
@use '../../pastanaga-angular/src/styles/theme/spacing.tokens';

.form-field-config {
.state-option {
display: flex;
margin: rhythm(1) 0;
margin: spacing.rhythm(1) 0;
}
.option {
margin-right: rhythm(2);
margin-right: spacing.rhythm(2);

input {
margin-right: rhythm(1);
margin-right: spacing.rhythm(1);
}
}
fieldset {
margin: rhythm(3) 0;
margin: spacing.rhythm(3) 0;
}
}
.component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

$padding-accordion-body: rhythm(2);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

.pa-avatar-pile {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

@mixin sliderTrack {
appearance: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../../../../styles/variables';
@use '../../../../styles/variables' as *;
@use 'sass:string';

.pa-field {
::-webkit-resizer {
Expand All @@ -12,7 +13,7 @@
&.pa-text-area-resizable:not(:disabled) {
background-repeat: no-repeat;
background-position: right bottom;
background-image: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="%23' + str_slice(
background-image: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="%23' + string.slice(
#{$color-neutral-regular},
2
) + '" fill-rule="evenodd"> <path d="M28.4419 12.4419L28.8839 12L28 11.1161L27.558 11.558L15.558 23.558L15.1161 24L16 24.8839L16.4419 24.4419L28.4419 12.4419ZM28.4419 16.4419L28.8839 16L28 15.1161L27.558 15.558L19.558 23.558L19.1161 24L20 24.8839L20.4419 24.4419L28.4419 16.4419Z"></path> </g></svg>');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'sass:math';
@import '../../../../styles/variables';
@use '../../../../styles/variables' as *;

$toggle-mid-width: math.div($width-toggle, 2);
$toggle-transition-duration: $duration-fast;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

:host {
--day-width: #{rhythm(4)};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

$option-height: rhythm(6);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

.pa-option-header {
@include size(xs);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

.pa-separator {
border-bottom: 1px solid $color-border-menu-separator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../../styles/variables';
@import '../../../styles/theme/modal.tokens';
@use '../../../styles/variables' as *;

.pa-confirmation-dialog {
background-color: $color-light-stronger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../../styles/variables';
@import '../../../styles/theme/modal.tokens';
@use '../../../styles/variables' as *;
@use '../../../styles/theme/modal.tokens' as modal;

.pa-modal-advanced {
background-color: $color-light-stronger;
Expand All @@ -8,20 +8,20 @@
align-items: center;
display: flex;
justify-content: space-between;
padding: $spacing-dialog-sections calc(#{$padding-modal} - #{$padding-button-icon-medium}) $spacing-dialog-sections
$padding-modal;
padding: $spacing-dialog-sections calc(#{modal.$padding-modal} - #{$padding-button-icon-medium})
modal.$spacing-dialog-sections $padding-modal;
}

.pa-modal-content {
min-height: calc(100% - #{$height-header-footer-modal} - #{$spacing-dialog-sections});
min-height: calc(100% - #{modal.$height-header-footer-modal} - #{modal.$spacing-dialog-sections});
}

&.with-footer .pa-modal-content {
min-height: calc(100% - #{$height-header-footer-modal} * 2);
min-height: calc(100% - #{modal.$height-header-footer-modal} * 2);
}

pa-modal-footer {
padding: 0 $padding-modal;
padding: 0 modal.$padding-modal;
}

@media (max-width: $size-viewport-medium-max) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@import '../../../styles/variables';
@import '../../../styles/theme/modal.tokens';
@use '../../../styles/variables' as *;
@use '../../../styles/theme/modal.tokens' as modal;

$dimension-image: rhythm(12);
$header-height-small: $padding-modal + $dimension-image + $spacing-dialog-sections * 2 + line-height(l);
$header-height-medium: $padding-modal + $dimension-image + $spacing-dialog-sections * 2 + line-height(xl);
$header-height-small: modal.$padding-modal + $dimension-image + modal.$spacing-dialog-sections * 2 + line-height(l);
$header-height-medium: modal.$padding-modal + $dimension-image + modal.$spacing-dialog-sections * 2 + line-height(xl);

.pa-modal-dialog {
.pa-modal-header {
padding: $padding-modal $padding-modal $spacing-dialog-sections;
padding: modal.$padding-modal modal.$padding-modal modal.$spacing-dialog-sections;
text-align: left;

img {
margin-bottom: $spacing-dialog-sections;
margin-bottom: modal.$spacing-dialog-sections;
height: $dimension-image;
width: $dimension-image;
}
Expand All @@ -35,7 +35,7 @@ $header-height-medium: $padding-modal + $dimension-image + $spacing-dialog-secti
}

&:not(.with-footer) .pa-modal-content {
margin-bottom: $padding-modal;
margin-bottom: modal.$padding-modal;
}

@media (min-width: $size-viewport-medium-min) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

.pa-side-nav-item {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

.pa-side-nav {
background-color: $background-color-side-nav;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

pa-table-lead-image {
margin-right: rhythm(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../styles/variables';
@use '../../../styles/variables' as *;

button {
color: $color-text-table-header;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/variables';
@use '../../styles/variables' as *;

:host {
display: flex;
Expand Down
42 changes: 21 additions & 21 deletions projects/pastanaga-angular/src/styles/_core.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
@import 'variables';
@import 'reboot';
@import 'typography';
@use 'variables';
@use 'reboot';
@use 'typography';

@import 'components/avatar';
@import 'components/buttons';
@import 'components/checkbox';
@import 'components/chips';
@import 'components/expander';
@import 'components/focus';
@import 'components/icons';
@import 'components/layout';
@import 'components/modal';
@import 'components/popup';
@import 'components/popover';
@import 'components/scrollbar';
@import 'components/select';
@import 'components/tabs';
@import 'components/tables';
@import 'components/textfields';
@import 'components/toast';
@import 'components/tooltip';
@use 'components/avatar';
@use 'components/buttons';
@use 'components/checkbox';
@use 'components/chips';
@use 'components/expander';
@use 'components/focus';
@use 'components/icons';
@use 'components/layout';
@use 'components/modal';
@use 'components/popup';
@use 'components/popover';
@use 'components/scrollbar';
@use 'components/select';
@use 'components/tabs';
@use 'components/tables';
@use 'components/textfields';
@use 'components/toast';
@use 'components/tooltip';
2 changes: 1 addition & 1 deletion projects/pastanaga-angular/src/styles/_cssvariables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'variables';
@use 'variables' as *;

:root {
--color-dark-stronger: #{$color-dark-stronger};
Expand Down
Loading

0 comments on commit b5ce031

Please sign in to comment.