Skip to content

Commit

Permalink
Merge pull request #54 from ScottLogic/scoped-style-fixes
Browse files Browse the repository at this point in the history
Fixing missed scoped styles
  • Loading branch information
jmain-scottlogic authored May 2, 2024
2 parents 2cdc6cf + 3295a3f commit 3525611
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ yarn-error.log
/libpeerconnection.log
testem.log
/typings
/.nx/*

# System files
.DS_Store
Expand Down
22 changes: 1 addition & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/app/carbon-estimation/carbon-estimation.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ const customTooltip = ({
const initialSeries = w.globals.initialSeries[seriesIndex];
const data = initialSeries.data[dataPointIndex];

return `<div class="rounded flex max-w-40 md:max-w-none">
<div class="p-1 md:p-2 flex" style="background-color:${initialSeries.color}"><div class="${data.meta.svg} m-auto size-4 md:size-8"></div></div>
<div class="p-1 md:p-2">
<div class="text-wrap">${data.meta.parent}:</div>
<div class="text-wrap">${data.x} -
<span class="font-bold">${tooltipFormatter(series[seriesIndex][dataPointIndex])}</span></div></div>`;
return `<div class="tce-rounded tce-flex tce-max-w-40 md:tce-max-w-none">
<div class="tce-p-1 md:tce-p-2 tce-flex" style="background-color:${initialSeries.color}"><div class="${data.meta.svg} tce-m-auto tce-size-4 md:tce-size-8"></div></div>
<div class="tce-p-1 md:tce-p-2">
<div class="tce-text-wrap">${data.meta.parent}:</div>
<div class="tce-text-wrap">${data.x} -
<span class="tce-font-bold">${tooltipFormatter(series[seriesIndex][dataPointIndex])}</span></div></div>`;
};

export const chartOptions: ChartOptions = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/expansion-panel/expansion-panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
{{ expanded ? 'expand_less' : 'expand_more' }}
</button>
</div>
<div [ngClass]="{ hidden: !expanded }" role="region">
<div [ngClass]="{ 'tce-hidden': !expanded }" role="region">
<ng-content select="[content]"></ng-content>
</div>
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
},
plugins: [
scopedPreflightStyles({
isolationStrategy: isolateInsideOfContainer('tech-carbon-estimator'),
isolationStrategy: isolateInsideOfContainer(['tech-carbon-estimator', '.cdk-overlay-container']),
}),
form
],
Expand Down

0 comments on commit 3525611

Please sign in to comment.