Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
aaazzam committed Apr 18, 2024
1 parent 2e27c3d commit 4f69891
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 51 deletions.
8 changes: 4 additions & 4 deletions public/tailwindPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const colors = {
'focus-ring': 'var(--p-color-focus-ring)',
'focus-ring-offset': 'var(--p-color-focus-ring-offset)',
live: 'var(--p-color-live)',
'sentiment-positive': 'hsl(var(--p-color-sentiment-positive-hsl-values) / <alpha-value>)',
'sentiment-neutral': 'hsl(var(--p-color-sentiment-neutral-hsl-values) / <alpha-value>)',
'sentiment-warning': 'hsl(var(--p-color-sentiment-warning-hsl-values) / <alpha-value>)',
'sentiment-negative': 'hsl(var(--p-color-sentiment-negative-hsl-values) / <alpha-value>)',
'sentiment-positive': 'hsl(var(--positive) / <alpha-value>)',
'sentiment-neutral': 'hsl(var(--neutral) / <alpha-value>)',
'sentiment-warning': 'hsl(var(--warning) / <alpha-value>)',
'sentiment-negative': 'hsl(var(--destructive) / <alpha-value>)',
}

const spacing = {
Expand Down
8 changes: 4 additions & 4 deletions src/compositions/useThemeTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,22 @@ function getTokens() {
colorSelected: style.getPropertyValue('--p-color-selected'),
colorSelectionHighlight: style.getPropertyValue('--p-color-selection-highlight'),
colorSentimentNegative: style.getPropertyValue('--p-color-sentiment-negative'),
colorSentimentNegativeHslValues: style.getPropertyValue('--p-color-sentiment-negative-hsl-values'),
colorSentimentNegativeHslValues: style.getPropertyValue('--destructive'),
colorSentimentNegativeHue: style.getPropertyValue('--p-color-sentiment-negative-hue'),
colorSentimentNegativeLightness: style.getPropertyValue('--p-color-sentiment-negative-lightness'),
colorSentimentNegativeSaturation: style.getPropertyValue('--p-color-sentiment-negative-saturation'),
colorSentimentNeutral: style.getPropertyValue('--p-color-sentiment-neutral'),
colorSentimentNeutralHslValues: style.getPropertyValue('--p-color-sentiment-neutral-hsl-values'),
colorSentimentNeutralHslValues: style.getPropertyValue('--neutral'),
colorSentimentNeutralHue: style.getPropertyValue('--p-color-sentiment-neutral-hue'),
colorSentimentNeutralLightness: style.getPropertyValue('--p-color-sentiment-neutral-lightness'),
colorSentimentNeutralSaturation: style.getPropertyValue('--p-color-sentiment-neutral-saturation'),
colorSentimentPositive: style.getPropertyValue('--p-color-sentiment-positive'),
colorSentimentPositiveHslValues: style.getPropertyValue('--p-color-sentiment-positive-hsl-values'),
colorSentimentPositiveHslValues: style.getPropertyValue('--positive'),
colorSentimentPositiveHue: style.getPropertyValue('--p-color-sentiment-positive-hue'),
colorSentimentPositiveLightness: style.getPropertyValue('--p-color-sentiment-positive-lightness'),
colorSentimentPositiveSaturation: style.getPropertyValue('--p-color-sentiment-positive-saturation'),
colorSentimentWarning: style.getPropertyValue('--p-color-sentiment-warning'),
colorSentimentWarningHslValues: style.getPropertyValue('--p-color-sentiment-warning-hsl-values'),
colorSentimentWarningHslValues: style.getPropertyValue('--warning'),
colorSentimentWarningHue: style.getPropertyValue('--p-color-sentiment-warning-hue'),
colorSentimentWarningLightness: style.getPropertyValue('--p-color-sentiment-warning-lightness'),
colorSentimentWarningSaturation: style.getPropertyValue('--p-color-sentiment-warning-saturation'),
Expand Down
54 changes: 11 additions & 43 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
:root {
--p-spacing-focus-ring: 2px;
--p-spacing-focus-ring-offset: 1px;

--p-radius-default: 6px;
--p-scrollbar-width: 12px;
--destructive: 4 74% 49%;
--positive: 142 71% 45%;
--neutral: 240 5% 46%;
--warning: 40 92% 50%;

--p-color-sentiment-positive: hsl(var(--positive));
--p-color-sentiment-neutral: hsl(var(--neutral));
--p-color-sentiment-warning: hsl(var(--warning));
--p-color-sentiment-negative: hsl(var(--destructive));
}

.dark {
Expand Down Expand Up @@ -50,27 +58,6 @@

--p-color-live: #6272FF;

--p-color-sentiment-positive-hue: 142deg;
--p-color-sentiment-positive-saturation: 71%;
--p-color-sentiment-positive-lightness: 45%;
--p-color-sentiment-positive-hsl-values: var(--p-color-sentiment-positive-hue) var(--p-color-sentiment-positive-saturation) var(--p-color-sentiment-positive-lightness);
--p-color-sentiment-positive: hsl(var(--p-color-sentiment-positive-hsl-values));
--p-color-sentiment-neutral-hue: 240deg;
--p-color-sentiment-neutral-saturation: 5%;
--p-color-sentiment-neutral-lightness: 46%;
--p-color-sentiment-neutral-hsl-values: var(--p-color-sentiment-neutral-hue) var(--p-color-sentiment-neutral-saturation) var(--p-color-sentiment-neutral-lightness);
--p-color-sentiment-neutral: hsl(var(--p-color-sentiment-neutral-hsl-values));
--p-color-sentiment-warning-hue: 40deg;
--p-color-sentiment-warning-saturation: 92%;
--p-color-sentiment-warning-lightness: 50%;
--p-color-sentiment-warning-hsl-values: var(--p-color-sentiment-warning-hue) var(--p-color-sentiment-warning-saturation) var(--p-color-sentiment-warning-lightness);
--p-color-sentiment-warning: hsl(var(--p-color-sentiment-warning-hsl-values));
--p-color-sentiment-negative-hue: 4deg;
--p-color-sentiment-negative-saturation: 74%;
--p-color-sentiment-negative-lightness: 49%;
--p-color-sentiment-negative-hsl-values: var(--p-color-sentiment-negative-hue) var(--p-color-sentiment-negative-saturation) var(--p-color-sentiment-negative-lightness);
--p-color-sentiment-negative: hsl(var(--p-color-sentiment-negative-hsl-values));

/* Text */
--p-color-text-default: #FFFFFF;
--p-color-text-subdued: #ADADAD;
Expand Down Expand Up @@ -200,6 +187,8 @@
.light {
color-scheme: light;



/* Background */
--p-color-bg-0: #EFEFF0;
--p-color-bg-1: #FFFFFF;
Expand All @@ -222,27 +211,6 @@

--p-color-live: #4B5CFF;

--p-color-sentiment-positive-hue: 142deg;
--p-color-sentiment-positive-saturation: 71%;
--p-color-sentiment-positive-lightness: 45%;
--p-color-sentiment-positive-hsl-values: var(--p-color-sentiment-positive-hue) var(--p-color-sentiment-positive-saturation) var(--p-color-sentiment-positive-lightness);
--p-color-sentiment-positive: hsl(var(--p-color-sentiment-positive-hsl-values));
--p-color-sentiment-neutral-hue: 240deg;
--p-color-sentiment-neutral-saturation: 5%;
--p-color-sentiment-neutral-lightness: 46%;
--p-color-sentiment-neutral-hsl-values: var(--p-color-sentiment-neutral-hue) var(--p-color-sentiment-neutral-saturation) var(--p-color-sentiment-neutral-lightness);
--p-color-sentiment-neutral: hsl(var(--p-color-sentiment-neutral-hsl-values));
--p-color-sentiment-warning-hue: 40deg;
--p-color-sentiment-warning-saturation: 92%;
--p-color-sentiment-warning-lightness: 50%;
--p-color-sentiment-warning-hsl-values: var(--p-color-sentiment-warning-hue) var(--p-color-sentiment-warning-saturation) var(--p-color-sentiment-warning-lightness);
--p-color-sentiment-warning: hsl(var(--p-color-sentiment-warning-hsl-values));
--p-color-sentiment-negative-hue: 4deg;
--p-color-sentiment-negative-saturation: 74%;
--p-color-sentiment-negative-lightness: 49%;
--p-color-sentiment-negative-hsl-values: var(--p-color-sentiment-negative-hue) var(--p-color-sentiment-negative-saturation) var(--p-color-sentiment-negative-lightness);
--p-color-sentiment-negative: hsl(var(--p-color-sentiment-negative-hsl-values));

/* Text */
--p-color-text-default: #171717;
--p-color-text-subdued: #70707B;
Expand Down

0 comments on commit 4f69891

Please sign in to comment.