@fluid-topics/ft-typography 1.3.14 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CSSResult } from "lit";
|
|
2
2
|
import { typographies } from "@fluid-topics/design-system-variables";
|
|
3
|
-
export declare function buildDsTypographyCss(variant: keyof typeof typographies): CSSResult;
|
|
3
|
+
export declare function buildDsTypographyCss(variant: keyof typeof typographies, selector?: string | CSSResult): CSSResult;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { css, unsafeCSS } from "lit";
|
|
2
2
|
import { typographies } from "@fluid-topics/design-system-variables";
|
|
3
|
-
export function buildDsTypographyCss(variant) {
|
|
3
|
+
export function buildDsTypographyCss(variant, selector) {
|
|
4
4
|
const typographyVariables = typographies[variant];
|
|
5
5
|
return css `
|
|
6
|
-
|
|
6
|
+
${selector ? unsafeCSS(selector) : css `.ft-typography--${unsafeCSS(variant)}`} {
|
|
7
7
|
font-family: ${typographyVariables.fontFamily};
|
|
8
8
|
font-size: ${typographyVariables.fontSize};
|
|
9
9
|
font-weight: ${typographyVariables.fontWeight};
|
|
10
10
|
letter-spacing: ${typographyVariables.letterSpacing};
|
|
11
11
|
line-height: ${typographyVariables.lineHeight};
|
|
12
|
+
text-decoration: ${typographyVariables.textDecoration};
|
|
12
13
|
text-transform: ${typographyVariables.textCase};
|
|
13
14
|
}
|
|
14
15
|
`;
|