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

migrering scss #656

Merged
merged 6 commits into from
Jan 30, 2025
Merged
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Change-log](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
# 12.0.0 (2024-12-18)
# 13.1.0 (2025-01-30)
- Updated deprecated SCSS imports and removed all @import.
# 13.0.0 (2024-12-18)
- Upgraded to Angular 19.
# 12.0.4 (2024-11-14)
- Updated wcag for `filter-tag-group` so that you tab in/out of the component and inside you use the arrow keys.
Expand Down
2 changes: 1 addition & 1 deletion projects/komponentkartan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vgr-komponentkartan",
"version": "13.0.0",
"version": "13.1.0-beta",
"peerDependencies": {
"@angular/cdk": ">=17.0.0",
"@angular/common": ">=17.0.0",
Expand Down
24 changes: 12 additions & 12 deletions projects/komponentkartan/src/assets/komponentkartan.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* Struktur efter ITCSS, se https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/*/

@import "partials/generic.reset";
/* SETTINGS */
@forward "partials/generic.reset";
// /* SETTINGS */

@import "partials/_base.page.scss";
@import "partials/_base.links.scss";
@import "partials/_base.text.scss";
@import "partials/_base.input.scss";
/* OBJECTS */
@forward "partials/_base.page.scss";
@forward "partials/_base.links.scss";
@forward "partials/_base.text.scss";
@forward "partials/_base.input.scss";
// /* OBJECTS */

@import "partials/_objects.colors.scss";
@import "partials/_objects.layout.scss";
@import "partials/_objects.sizes.scss";
@import "partials/_objects.images.scss";
@import "partials/_objects.validation.scss";
@forward "partials/_objects.colors.scss";
@forward "partials/_objects.layout.scss";
@forward "partials/_objects.sizes.scss";
@forward "partials/_objects.images.scss";
@forward "partials/_objects.validation.scss";
/* COMPONENTS */

10 changes: 6 additions & 4 deletions projects/komponentkartan/src/assets/partials/_base.input.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import "_settings.fonts.scss";
@import "_settings.sizes.scss";
@use "_settings.fonts.scss" as *;
@use "_settings.sizes.scss" as *;
@use "_settings.colors.scss" as *;

input,
textarea {
font-family: $font-family;
Expand All @@ -12,8 +14,8 @@ textarea {
border-radius: 1px;
border: 1px solid $control-border-color--default;
height: 30px;
&:focus {
outline: none;
&:focus, :focus-visible {
outline: none !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "_settings.fonts.scss";
@use "_settings.fonts.scss" as *;

a {
color: #006298;
Expand Down
6 changes: 3 additions & 3 deletions projects/komponentkartan/src/assets/partials/_base.page.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "_settings.colors.scss";
@import "_settings.fonts.scss";
@import "_settings.sizes.scss";
@use "_settings.colors.scss" as *;
@use "_settings.fonts.scss" as *;
@use "_settings.sizes.scss" as *;

*,
*:before,
Expand Down
6 changes: 3 additions & 3 deletions projects/komponentkartan/src/assets/partials/_base.text.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "_settings.colors.scss";
@import "_settings.fonts.scss";
@import "_settings.sizes.scss";
@use "_settings.colors.scss" as *;
@use "_settings.fonts.scss" as *;
@use "_settings.sizes.scss" as *;

header,
p,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* .background-color--secondary
* With themes for all defined colors.
**********************************************************************************/
@use './_settings.colors' as *;

@mixin theme($property) {
.#{$property}--primary {
Expand Down
10 changes: 6 additions & 4 deletions projects/komponentkartan/src/assets/partials/_base.themify.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "_objects.colors.scss";
@use "_objects.colors.scss" as *;
@use "_settings.colors.scss" as *;
@use "sass:map";

$theme-map: null;
$themes: (
Expand Down Expand Up @@ -30,7 +32,7 @@ $themes: (
);

@function themed($key) {
@return map-get($theme-map, $key);
@return map.get($theme-map, $key);
}


Expand All @@ -40,8 +42,8 @@ $themes: (
.theme--#{$theme} & {
$theme-map: () !global;
@each $key, $submap in $map {
$value: map-get(map-get($themes, $theme), '#{$key}');
$theme-map: map-merge($theme-map, ($key: $value)) !global;
$value: map.get(map.get($themes, $theme), '#{$key}');
$theme-map: map.merge($theme-map, ($key: $value)) !global;
}

@content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "_settings.colors.scss" as *;

.blue--primary {
background-color: $primary-color--blue;
color: $text-color--light;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@use './settings.sizes' as *;
@use './settings.fonts' as *;
@use './settings.colors' as *;

.row-layout {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -133,9 +137,11 @@
>*:first-child {
padding-bottom: 10px;
}
display: flex;
flex-direction: column;
justify-content: flex-end;
& {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
}

.control-without-heading {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use './settings.colors' as *;

.validation {
max-height: none;
// padding: 1px; // för att den skall ha plats för ev. validering (och inte hoppa)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//background
@use "sass:color";
//background
$background-color--default: #f0f0f0;
$background-color--content: #ffffff;
$background-color--disabled: #87939f;
Expand All @@ -25,10 +26,10 @@ $border-color: #87939f;
$border-color--light: #dfdfdf;
//menu
$menu-text-color: $text-color--default;
$menu-color--inactive: transparentize($background-color--default, 0.3);
$menu-color--inactive: color.scale($background-color--default, $alpha: -30%);
//misc
$focus-color: #2275D3;
$modal-background-color: transparentize($text-color--default, 0.35);
$modal-background-color: color.scale($text-color--default, $alpha: -35%);
//themes
$primary-color--blue: #006298;
$secondary-color--blue: #4C91B7;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;

.action-panel {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/objects.images";
@import "../../../assets/partials/base.themify";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/objects.images" as *;
@use "../../../assets/partials/base.themify" as *;
@use "sass:color";

.button__base {
@include themify($themes) {
Expand All @@ -25,7 +26,7 @@
transform: scale(0.96);
outline: 0;
.button__focus-line {
background-color: transparentize($secondary-color--default, 0.4);
background-color: color.scale($secondary-color--default, $alpha: -40%);
}
}
&:hover:not(.button--disabled),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.fonts.scss";
@import "./button.base.scss";
@import "../../../assets/partials/base.themify.scss";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.fonts.scss" as *;
@use "./button.base.scss" as *;
@use "../../../assets/partials/base.themify.scss" as *;
@use "sass:color";

@mixin button-enabling--secondary($name, $color) {
@keyframes #{$name} {
Expand Down Expand Up @@ -68,7 +69,7 @@
transform: scale(0.96);
outline: 0;
.button__focus-line {
background-color: transparentize($secondary-color--default, 0.4);
background-color: color.scale($secondary-color--default, $alpha: -40%);
}
}
&:hover:not(.button--disabled),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.fonts.scss";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.fonts.scss" as *;

:host::ng-deep {
vgr-card-section {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.fonts.scss";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.fonts.scss" as *;

:host {


.checkbox-group-validation-error--active .checkbox-group-validation {
padding-bottom: 8px;
Expand Down Expand Up @@ -31,7 +31,7 @@

.checkbox-group {
min-width: 120px;
width: max-content;
width: max-content;
}
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@use "../../../assets/partials/_settings.colors.scss" as *;

/* First, hide the default checkbox. It cannot be styled with CSS.
* Instead, we will use the "label" that is associated with our textbox.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.sizes.scss";
@import "../button/button.base.scss";
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../button/button.base.scss" as *;
@use "../../../assets/partials/base.themify.scss" as *;
@use "sass:color";

:host::ng-deep {
.close-button {
Expand All @@ -26,7 +28,7 @@
transform: scale(0.96);
outline: 0;
.button__focus-line {
background-color: transparentize($secondary-color--default, 0.4);
background-color: color.scale($secondary-color--default, $alpha: -40%);
}
}
&:hover:not(.button--disabled),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.fonts.scss";
@import "../../../assets/partials/objects.images";
@import "../../../assets/partials/base.themify";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.fonts.scss" as *;
@use "../../../assets/partials/objects.images" as *;
@use "../../../assets/partials/base.themify" as *;
@use "sass:map";

// @include theme(background-color);
// @include theme(border-left-color);
Expand Down Expand Up @@ -108,7 +109,7 @@
transition: all 0.6s linear;

.combobox__header__button__icon {
background: transparent map-get($imagesBase64, 'bg-image-icon-chevron') center no-repeat;
background: transparent map.get($imagesBase64, 'bg-image-icon-chevron') center no-repeat;
background-size: 40%;
width: 36px;
height: 30px;
Expand Down Expand Up @@ -137,7 +138,7 @@
cursor: default;

&::before {
background: transparent map-get($imagesBase64, 'bg-image-menu-arrow') center no-repeat;
background: transparent map.get($imagesBase64, 'bg-image-menu-arrow') center no-repeat;
width: 16px;
height: 21px;
content: "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/base.themify.scss";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/base.themify.scss" as *;


:host::ng-deep {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/_settings.fonts.scss";
@import "../../../assets/partials/objects.images";
@import "../../../assets/partials/base.themify";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/_settings.fonts.scss" as *;
@use "../../../assets/partials/objects.images" as *;
@use "../../../assets/partials/base.themify" as *;
@use "sass:map";

// @include theme(background-color);
// @include theme(border-left-color);
Expand Down Expand Up @@ -143,7 +144,7 @@
transition: all 0.6s linear;

.dropdown-select__header__button__icon {
background: transparent map-get($imagesBase64, 'bg-image-icon-chevron') center no-repeat;
background: transparent map.get($imagesBase64, 'bg-image-icon-chevron') center no-repeat;
background-size: 40%;
width: 36px;
height: 30px;
Expand Down Expand Up @@ -190,7 +191,7 @@

&::before {
// @extend .bg-image-menu-arrow;
background: transparent map-get($imagesBase64, 'bg-image-menu-arrow') center no-repeat;
background: transparent map.get($imagesBase64, 'bg-image-menu-arrow') center no-repeat;
width: 16px;
height: 21px;
content: "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "../../../assets/partials/_settings.sizes.scss";
@import "../../../assets/partials/_settings.colors.scss";
@import "../../../assets/partials/base.themify";
@use "../../../assets/partials/_settings.sizes.scss" as *;
@use "../../../assets/partials/_settings.colors.scss" as *;
@use "../../../assets/partials/base.themify" as *;

:host::ng-deep {
.scroll-container {
Expand Down Expand Up @@ -147,7 +147,7 @@
.list-wrapper {
border-collapse: collapse;
display: table;
width: 100%;
width: 100%;
margin-top: 10px;
}

Expand Down
Loading