💄(tokens) titles QA feedbacks
QA-based updates to the title classes, the letter-spacing was not taken into account previously.
This commit is contained in:
@@ -18,7 +18,10 @@ export const cssGenerator: Generator = async (tokens, opts) => {
|
||||
const flatTokens = flatify(tokens, Config.sass.varSeparator);
|
||||
const cssVars = Object.keys(flatTokens).reduce((acc, token) => {
|
||||
return (
|
||||
acc + `\t--${Config.sass.varPrefix}${token}: ${flatTokens[token]};\n`
|
||||
acc +
|
||||
`\t--${Config.sass.varPrefix}${token.toLowerCase()}: ${
|
||||
flatTokens[token]
|
||||
};\n`
|
||||
);
|
||||
}, "");
|
||||
let cssContent = `${opts.selector} {\n${cssVars}}`;
|
||||
@@ -99,7 +102,10 @@ function generateFwClasses(tokens: Tokens) {
|
||||
function generateFsClasses(tokens: Tokens) {
|
||||
return Object.keys(tokens.theme.font.sizes).map(
|
||||
(key) =>
|
||||
`.fs-${key} { font-size: var(--${Config.sass.varPrefix}theme--font--sizes--${key}); }`,
|
||||
`.fs-${key} {
|
||||
font-size: var(--${Config.sass.varPrefix}theme--font--sizes--${key});
|
||||
letter-spacing: var(--${Config.sass.varPrefix}theme--font--letterspacings--${key});
|
||||
}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,18 @@ const fontSizes = {
|
||||
s: "0.6875rem",
|
||||
};
|
||||
|
||||
const fontLetterSpacings = {
|
||||
h1: "normal",
|
||||
h2: "normal",
|
||||
h3: "normal",
|
||||
h4: "normal",
|
||||
h5: "1px",
|
||||
h6: "normal",
|
||||
l: "normal",
|
||||
m: "normal",
|
||||
s: "normal",
|
||||
};
|
||||
|
||||
const fontWeights = {
|
||||
thin: 200,
|
||||
light: 300,
|
||||
@@ -147,6 +159,7 @@ export default {
|
||||
sizes: fontSizes,
|
||||
weights: fontWeights,
|
||||
families: fontFamilies,
|
||||
letterSpacings: fontLetterSpacings,
|
||||
},
|
||||
spacings,
|
||||
transitions,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
:root {
|
||||
html {
|
||||
--c--theme--colors--primary: #055FD2;
|
||||
--c--theme--colors--secondary: #DA0000;
|
||||
--c--theme--colors--ternary-900: #022858;
|
||||
@@ -19,7 +19,10 @@
|
||||
.bg-ternary-900 { background-color: var(--c--theme--colors--ternary-900); }
|
||||
.bg-ogre-odor-is-orange-indeed { background-color: var(--c--theme--colors--ogre-odor-is-orange-indeed); }
|
||||
.fw-medium { font-weight: var(--c--theme--font--weights--medium); }
|
||||
.fs-m { font-size: var(--c--theme--font--sizes--m); }
|
||||
.fs-m {
|
||||
font-size: var(--c--theme--font--sizes--m);
|
||||
letter-spacing: var(--c--theme--font--letterspacings--m);
|
||||
}
|
||||
.f-base { font-family: var(--c--theme--font--families--base); }
|
||||
.m-s { margin: var(--c--theme--spacings--s); }.mb-s { margin-bottom: var(--c--theme--spacings--s); }.mt-s { margin-top: var(--c--theme--spacings--s); }.ml-s { margin-left: var(--c--theme--spacings--s); }.mr-s { margin-right: var(--c--theme--spacings--s); }
|
||||
.p-s { padding: var(--c--theme--spacings--s); }.pb-s { padding-bottom: var(--c--theme--spacings--s); }.pt-s { padding-top: var(--c--theme--spacings--s); }.pl-s { padding-left: var(--c--theme--spacings--s); }.pr-s { padding-right: var(--c--theme--spacings--s); }
|
||||
|
||||
Reference in New Issue
Block a user