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

Theming #9

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
node_modules
node_modules
.vscode/launch.json
362 changes: 362 additions & 0 deletions demos/cssVar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,362 @@
<head>
<link rel="stylesheet" href="../../build/css/variables.css">
<link rel="stylesheet" href="style.css">
</head>


<section id="neutral">
<h2>Neutral</h2>
<div class="row">
<p>Foreground</p>
<div class="color-swatch" style="background-color: var( --xpl-color-neutral-foreground-lm);">
<p>gray0</p>
</div>
<div class="color-swatch" style="background-color: var( --xpl-color-neutral-foreground-dm);">
<p>gray1000</p>
</div>
</div>

<div class="row">
<p>Background</p>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-background-lm);">
gray50
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-background-dm);">
gray1200
</div>
</div>

<div class="row">
<p>Background2</p>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-background2-lm);">
gray100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-background2-dm);">
gray1100
</div>
</div>

<div class="row">
<p>navigation</p>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-navigation-lm);">
gray1000
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-navigation-dm);">
gray1000
</div>
</div>

<div class="row">
<p>stroke</p>

<div class="color-swatch" style="background-color: var(--xpl-color-neutral-stroke-lm);">
gray400
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-neutral-stroke-dm);">
gray900
</div>
</div>
</section>
<section id="brand">
<h2>Brand</h2>
<div class="row">
<p>Primary</p>
<div class="color-swatch" style="background-color: var(--xpl-color-primary500);">
primary500
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-primary300);">
primary300
</div>
</div>
<div class="row">
<p>Primary Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-primary50);">
primary50
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-gray1100);">
gray1100
</div>
</div>
<div class="row">
<p>Primary Gradient</p>
<div class="color-swatch" style="background: linear-gradient(var(--xpl-color-brand-primary-gradient-start-lm), var(--xpl-color-brand-primary-gradient-start-lm));">
brand-primary-gradient-start
brand-primary-gradient-end
</div>
<div class="color-swatch" style="background: linear-gradient(var(--xpl-color-brand-primary-gradient-start-dm), var(--xpl-color-brand-primary-gradient-end-dm));">
brand-primary-gradient-start
brand-primary-gradient-end
</div>
</div>

<div class="row">
<p>secondary</p>
<div class="color-swatch" style="background-color: var(--xpl-color-secondary500);">
secondary500
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-secondary300);">
secondary300
</div>
</div>
<div class="row">
<p>secondary Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-secondary50);">
secondary50
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-gray1100);">
gray1100
</div>
</div>
<div class="row">
<p>secondary Gradient</p>
<div class="color-swatch" style="background: linear-gradient(var(--xpl-color-brand-secondary-gradient-start-lm), var(--xpl-color-brand-secondary-gradient-start-lm));">
brand-secondary-gradient-start
brand-secondary-gradient-end
</div>
<div class="color-swatch" style="background: linear-gradient(var(--xpl-color-brand-secondary-gradient-start-dm), var(--xpl-color-brand-secondary-gradient-end-dm));">
brand-secondary-gradient-start
brand-secondary-gradient-end
</div>
</div>
</section>

<section id="text">
<h2>Text</h2>
<div class="row">
<p>Text on Primary</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-on-primary-lm);">
text-on-primary-lm
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-on-primary-dm);">
text-on-primary-dm
</div>
</div>
<div class="row">
<p>Text on Secondary</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-on-secondary-lm);">
text-on-secondary-lm
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-on-secondary-dm);">
text-on-secondary-dm
</div>
</div>

<div class="row">
<p>Text</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-lm);">
gray1000
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-dm);">
gray0
</div>
</div>

<div class="row">
<p>Text Subdued</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-subdued-lm);">
gray600
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-subdued-dm);">
gray1100
</div>
</div>

<div class="row">
<p>Text Reverse</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-reverse-lm);">
gray0
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-reverse-dm);">
gray1000
</div>
</div>

<div class="row">
<p>Text Negative</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-negative-lm);">
red700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-negative-dm);">
red300
</div>
</div>

<div class="row">
<p>Text Positive</p>
<div class="color-swatch" style="background-color: var(--xpl-color-text-positive-lm);">
green700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-text-positive-dm);">
green300
</div>
</div>
</section>

<section id="common">
<h2>Common</h2>
<div class="row">
<p>Positive</p>
<div class="color-swatch" style="background-color: var(--xpl-color-positive-lm);">
green500
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-positive-dm);">
green400
</div>
</div>

<div class="row">
<p>Positive Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-positive-surface-lm);">
green100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-positive-surface-dm);">
gray.1000
</div>
</div>
<div class="row">
<p>Negative</p>
<div class="color-swatch" style="background-color: var(--xpl-color-negative-lm);">
red600
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-negative-dm);">
red300
</div>
</div>
<div class="row">
<p>Negative Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-negative-surface-lm);">
red100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-negative-surface-dm);">
gray.1000
</div>
</div>

<div class="row">
<p>highlight</p>
<div class="color-swatch" style="background-color: var(--xpl-color-highlight-lm);">
yellow500
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-highlight-dm);">
yellow200
</div>
</div>
<div class="row">
<p>highlight Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-highlight-surface-lm);">
yellow200
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-highlight-surface-dm);">
gray.1000
</div>
</div>

<div class="row">
<p>information</p>
<div class="color-swatch" style="background-color: var(--xpl-color-information-lm);">
purple700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-information-dm);">
purple300
</div>
</div>
<div class="row">
<p>information Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-information-surface-lm);">
purple100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-information-surface-dm);">
gray.1000
</div>
</div>

<div class="row">
<p>trivial</p>
<div class="color-swatch" style="background-color: var(--xpl-color-trivial-lm);">
purple700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-trivial-dm);">
purple300
</div>
</div>
<div class="row">
<p>trivial Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-trivial-surface-lm);">
purple100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-trivial-surface-dm);">
gray.1000
</div>
</div>
</section>

<section id="action">
<h2>action</h2>
<div class="row">
<p>action-primary</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-primary-lm);">
secondary500
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-primary-dm);">
secondary200
</div>
</div>
<div class="row">
<p>action-primary Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-primary-focus-lm);">
secondary600
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-primary-focus-dm);">
secondary300
</div>
</div>

<div class="row">
<p>action-negative</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-negative-lm);">
red700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-negative-dm);">
red300
</div>
</div>
<div class="row">
<p>action-negative Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-negative-focus-lm);">
red800
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-negative-focus-dm);">
red400
</div>
</div>

<div class="row">
<p>action-positive</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-positive-lm);">
green700
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-positive-dm);">
green300
</div>
</div>
<div class="row">
<p>action-positive Surface</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-positive-focus-lm);">
green800
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-positive-focus-dm);">
green400
</div>
</div>

<div class="row">
<p>action-disabled</p>
<div class="color-swatch" style="background-color: var(--xpl-color-action-disabled-lm);">
gray100
</div>
<div class="color-swatch" style="background-color: var(--xpl-color-action-disabled-dm);">
gray800
</div>
</div>
</div>
</section>
Loading