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

Update CSS token per new design system theming capability #16

Merged
merged 1 commit into from
Nov 8, 2023
Merged
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
10 changes: 6 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
</style>
<main></main>

<script type="module">
import 'https://unpkg.com/marked@latest/marked.min.js';
import 'https://unpkg.com/prismjs@latest/prism.js';
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs/prism.js"></script>
<script>
// import 'https://unpkg.com/marked@latest/marked.min.js';
// import 'https://unpkg.com/prismjs@latest/prism.js';
Comment on lines +35 to +39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jason-capsule42 and @fajar-apri-alaska not sure why this was passed though? Why were lines 38 and 39 commented out and 35 and 36 added? This is not how we have things laid out in the generator.

https://github.com/AlaskaAirlines/WC-Generator/blob/4a488a19c82508e4882626de03474ac555e1ba6a/template/demo/index.html#L31-L36

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one was my bad, I should just add <script type=module> instead of did above changes. I forgot that this changes is not mandatory, just the marked.parse part that is.

fetch('/demo/demo.md')
.then((response) => response.text())
.then((text) => {
const rawHtml = marked(text);
const rawHtml = marked.parse(text);
document.querySelector('main').innerHTML = rawHtml;
Prism.highlightAll();
});
Expand Down
63 changes: 34 additions & 29 deletions demo/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@
// ----------------------- DO NOT EDIT -----------------------------

// Import Auro tokens
@import './../node_modules/@alaskaairux/design-tokens/dist/tokens/SCSSVariables';
@import './../node_modules/@alaskaairux/design-tokens/dist/tokens/SassCustomProperties';
@import './../node_modules/@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';
@import './../node_modules/@aurodesignsystem/design-tokens/dist/tokens/SassCustomProperties';

// Import baseline library dependencies
// Mixins
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/breakpoints';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/breakpoints';

// Creates baseline output in CSS
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/fonts';
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/normalize';
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/headings';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/fonts';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/normalize';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/headings';

@import './../node_modules/@alaskaairux/webcorestylesheets/dist/utilityClasses/focusVisible';
$paragraph: true;
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/essentials';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/essentials';

// Support for fallback values
@import './../node_modules/@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables.scss';

// Import Utility classes (will produce CSS in output)
$layout-properties: margin;
$layout-extensions: Right;
$layout-modifiers: (
'md': $auro-size-md
'md': $ds-size-200
);
@import './../node_modules/@alaskaairux/webcorestylesheets/dist/utilityMixins/layoutPropertiesGenerator';
@import './../node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/layoutPropertiesGenerator';

// Custom styles per demo pages
body {
Expand All @@ -45,15 +50,15 @@ main {

.exampleWrapper {
$stripe: #f3f3f3;
$background: var(--auro-color-base-white);
$background: var(--ds-color-base-white, $ds-color-base-white);

background: repeating-linear-gradient( 45deg, $stripe, $stripe 10px, $background 10px, $background 20px);
overflow: auto;
}

.exampleWrapper--ondark {
$stripe: var(--auro-color-background-darkest);
$background: var(--auro-color-background-darker);
$stripe: var(--ds-color-background-darkest, $ds-color-background-darkest);
$background: var(--ds-color-background-darker, $ds-color-background-darker);

background: repeating-linear-gradient( 45deg, $stripe, $stripe 10px, $background 10px, $background 20px);
}
Expand All @@ -79,18 +84,18 @@ code[class*='language-'], pre[class*='language-'] {
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

code:not(.html):not(.css):not(.js) {
color: var(--auro-color-brand-flamingo-500);
color: var(--ds-color-brand-flamingo-500, $ds-color-brand-flamingo-500);
}

blockquote {
margin-left: 0;
border-left: 1px solid var(--auro-color-border-active-on-light);
padding: var(--auro-size-xs);
padding-left: var(--auro-size-xl);
color: var(--auro-color-text-secondary-on-light);
border-left: 1px solid var(--ds-color-border-active-default, $ds-color-border-active-default);
padding: var(--ds-size-100, $ds-size-100);
padding-left: var(--ds-size-400, $ds-size-400);
color: var(--ds-color-text-secondary-default, $ds-color-text-secondary-default);
font-weight: 200;
margin-top: var(--auro-size-lg);
margin-bottom: var(--auro-size-lg);
margin-top: var(--ds-size-300, $ds-size-300);
margin-bottom: var(--ds-size-300, $ds-size-300);

p {
line-height: 2;
Expand All @@ -100,7 +105,7 @@ blockquote {
}

& + p {
margin-bottom: var(--auro-size-xl);
margin-bottom: var(--ds-size-400, $ds-size-400);
}
}

Expand Down Expand Up @@ -148,8 +153,8 @@ strong {

pre {
overflow: auto;
background-color: var(--auro-color-base-gray-100);
margin-bottom: var(--auro-size-xxl);
background-color: var(--ds-color-brand-gray-100, $ds-color-brand-gray-100);
margin-bottom: var(--ds-size-600, $ds-size-600);

code {
font-size: .9rem;
Expand All @@ -161,19 +166,19 @@ table {
border-collapse: collapse;
overflow: scroll;
width: auto;
border-spacing: var(--auro-size-sm);
margin-bottom: var(--auro-size-xl);
font-weight: var(--auro-text-heading-display-weight);
border-spacing: var(--ds-size-150, $ds-size-150);
margin-bottom: var(--ds-size-400, $ds-size-400);
font-weight: var(--ds-text-heading-display-weight, $ds-text-heading-display-weight);

tr {
&:nth-child(even) {
background-color: var(--auro-color-base-gray-100);
background-color: var(--ds-color-brand-gray-100, $ds-color-brand-gray-100);
}
}

th {
text-align: left;
font-weight: var(--auro-text-heading-default-weight);
font-weight: var(--ds-text-heading-default-weight, $ds-text-heading-default-weight);
}

img {
Expand All @@ -187,10 +192,10 @@ table {
}

thead {
border-bottom: 1px solid var(--auro-color-base-gray-200);
border-bottom: 1px solid var(--ds-color-brand-gray-200, $ds-color-brand-gray-200);
border-collapse: collapse;
}

th, td {
padding: var(--auro-size-md);
padding: var(--ds-size-200, $ds-size-200);
}
Loading
Loading