Skip to content
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
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"build.css": "npm run css.sass && npm run css.minify",
"build.debug": "npm run clean && stencil build --debug",
"build.docs.json": "stencil build --docs-json dist/docs.json",
"build.tokens": "npx build.tokens --config scripts/tokens/index.mjs && npm run prettier.tokens",
"build.tokens": "node ./node_modules/outsystems-design-tokens/scripts/index.js --config ./scripts/tokens/index.mjs && npm run prettier.tokens",
"clean": "node scripts/clean.js",
"css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css",
"css.sass": "sass --embed-sources --style compressed src/css:./css",
Expand Down
4 changes: 3 additions & 1 deletion core/scripts/tokens/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
// - It also works very well out of the box with any kind of Design Tokens formats, like Figma Tokens, as well as APIs to adjust to more custom ones.
// - It is probably the most well-known and widely used Design Tokens tool. It has also been regularly maintained for a long time.
// - It can easily scale to different necessities we might have in the future.
import StyleDictionary from 'style-dictionary';

import * as utils from './utils.mjs';

const {
generateShadowValue,
generateFontSizeValue,
Expand All @@ -23,7 +26,6 @@ const {
generateShadowUtilityClasses,
generateUtilityClasses
} = utils;
import StyleDictionary from 'style-dictionary';

const customHeader = `// Do not edit directly, this file was auto-generated.`;
// Set the prefix for classes
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/tokens/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export function generateFontFamilyValue(prop, propName, variableType = 'css') {
const _propName = propName.split('-').slice(0, -1).join('-');

return variableType === 'scss'
? `$${classAndScssPrefix}-${_propName}: var(--${variablesPrefix}-${_propName}, "${prop.$value}", sans-serif);`
: `--${variablesPrefix}-${_propName}: "${prop.$value}", sans-serif;`;
? `$${classAndScssPrefix}-${_propName}: var(--${variablesPrefix}-${_propName}, ${prop.$value});`
: `--${variablesPrefix}-${_propName}: ${prop.$value};`;
}

// Generates a final value, based if the Design Token is of type color or not
Expand Down
13 changes: 10 additions & 3 deletions core/src/foundations/ionic.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,16 @@ $ion-transition-time-1000: var(--token-transition-time-1000, 1000ms);
$ion-transition-time-1500: var(--token-transition-time-1500, 1500ms);
$ion-font-family: var(
--token-font-family,
"-apple-system, system-ui, " Segoe UI ", Roboto, Helvetica, Arial, sans-serif, " Apple Color Emoji ", " Segoe UI Emoji
", " Segoe UI Symbol "",
sans-serif
-apple-system,
system-ui,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol"
);
$ion-font-weight-thin: var(--token-font-weight-thin, 100);
$ion-font-weight-extra-light: var(--token-font-weight-extra-light, 200);
Expand Down
Loading