Skip to content

Commit

Permalink
fix(components/tiles): remove ::ng-deep from tile styles (#2527)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-PaulCrowder authored Jul 22, 2024
1 parent bc029bd commit 09092d7
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
@use 'libs/components/theme/src/lib/styles/mixins' as mixins;
@use 'libs/components/theme/src/lib/styles/variables' as *;

:host:not(:last-child) .sky-tile-content-section {
@include mixins.sky-border(light);
}

:host-context(.sky-theme-modern sky-tile-content) {
.sky-tile-content-section {
border-bottom: 1px dotted $sky-theme-modern-color-gray-30;
}

:host:first-child {
.sky-tile-content-section {
margin-top: $sky-space-lg;
}
}

:host:last-child {
.sky-tile-content-section {
padding-bottom: 0;
border-bottom: none;
}
}
}

@include mixins.sky-theme-modern {
.sky-tile-content-section {
border-bottom: 1px dotted $sky-theme-modern-color-gray-30;
padding: $sky-space-lg 0;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Component } from '@angular/core';
@Component({
standalone: true,
selector: 'sky-tile-content',
styleUrls: ['./tile-content.component.scss'],
templateUrl: 'tile-content.component.html',
})
export class SkyTileContentComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@
.sky-tile-dashboard-layout-single {
display: block;
}

/* NOTE: This style is here as we only want it when inside a tile dashboard */
.sky-tile-dashboard-layout-single ::ng-deep .sky-tile,
.sky-tile-dashboard-layout-multi ::ng-deep .sky-tile {
margin-bottom: 0;
}
}

:host-context(.sky-tile-dashboard-gt-xs) {
.sky-tile-dashboard-layout-single ::ng-deep .sky-tile,
.sky-tile-dashboard-layout-multi ::ng-deep .sky-tile {
margin-bottom: $sky-margin-double;
}

:host-context(.sky-theme-default) {
padding-top: $sky-padding-double;
}
Expand Down Expand Up @@ -53,12 +42,3 @@
:host-context(.sky-theme-default) {
background-color: $sky-background-color-neutral-light;
}

@include mixins.sky-theme-modern {
:host-context(.sky-tile-dashboard-gt-xs) {
.sky-tile-dashboard-layout-single ::ng-deep .sky-tile,
.sky-tile-dashboard-layout-multi ::ng-deep .sky-tile {
margin-bottom: $sky-theme-modern-space-xl;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@
margin-bottom: $sky-margin-double;
}

/* NOTE: This style is here as we only want it when inside a tile dashboard */
:host-context(
.sky-tile-dashboard-layout-single,
.sky-tile-dashboard-layout-multi
)
.sky-tile {
margin-bottom: 0;
}

:host-context(.sky-tile-dashboard-gt-xs) {
:host-context(.sky-tile-dashboard-layout-single),
:host-context(.sky-tile-dashboard-layout-multi) {
.sky-tile {
margin-bottom: $sky-margin-double;
}
}

:host-context(.sky-theme-default) {
padding-top: $sky-padding-double;
}
}

.sky-tile-header {
border-color: $sky-border-color-neutral-medium;
border-style: solid solid none;
Expand Down Expand Up @@ -108,25 +130,6 @@
font-size: 16px;
}

.sky-tile-content {
::ng-deep .sky-tile-content-section {
border-bottom: 1px dotted $sky-theme-modern-color-gray-30;
}

::ng-deep sky-tile-content-section:first-child {
.sky-tile-content-section {
margin-top: $sky-space-lg;
}
}

::ng-deep sky-tile-content-section:last-child {
.sky-tile-content-section {
padding-bottom: 0;
border-bottom: none;
}
}
}

@include mixins.sky-host-responsive-container-xs-min() {
.sky-tile {
border-radius: 0px;
Expand All @@ -139,3 +142,12 @@
}
}
}

:host-context(.sky-theme-modern .sky-tile-dashboard-gt-xs) {
:host-context(.sky-tile-dashboard-layout-single),
:host-context(.sky-tile-dashboard-layout-multi) {
.sky-tile {
margin-bottom: $sky-theme-modern-space-xl;
}
}
}

0 comments on commit 09092d7

Please sign in to comment.