Skip to content

Commit

Permalink
fix: removed extra commons.css generation
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Sep 8, 2023
1 parent 9ba0ed5 commit 51bf536
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 0 additions & 5 deletions www/src/components/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ import { SettingsContext } from '../context/SettingsContext';
import LeaveFeedback from './LeaveFeedback';
import AutoToc from './AutoToc';

if (process.env.NODE_ENV === 'development') {
/* eslint-disable-next-line global-require */
require('~paragon-style/scss/core/core.scss');
}

export interface ILayout {
children: React.ReactNode,
showMinimizedTitle: boolean,
Expand Down
9 changes: 4 additions & 5 deletions www/src/pages/foundations/colors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface ISwatch {
isUnused?: boolean,
}

const styles = getComputedStyle(document.body);
const styles = window.getComputedStyle(document.body);

function Swatch({ name, colorClassName, isUnused }: ISwatch) {
const computedValue = styles.getPropertyValue(name);
Expand Down Expand Up @@ -128,16 +128,15 @@ export default function ColorsPage({ data }: IColorsPage) {
{colors
.slice(0, 3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
{colors
.slice(3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
<div>
<p className="h5">accents</p>

<Swatch name="--pgn-color-accent-a" colorClassName="bg-accent-a" />
<Swatch name="--pgn-color-accent-b" colorClassName="bg-accent-b" />
</div>

{colors
.slice(3)
.map(({ themeName, unusedLevels }) => renderColorRamp(themeName, unusedLevels))}
</div>

<h3>CSS Color Usage</h3>
Expand Down

0 comments on commit 51bf536

Please sign in to comment.