diff --git a/build/figma/figma.tokens.json b/build/figma/figma.tokens.json index bf8e1b87..793f909a 100644 --- a/build/figma/figma.tokens.json +++ b/build/figma/figma.tokens.json @@ -1057,7 +1057,7 @@ "type": "fontFamilies" }, "icons": { - "value": "'Font Awesome 6 Free', FontAwesome", + "value": "'gcds-icons'", "type": "fontFamilies" } }, @@ -3046,7 +3046,7 @@ "icon": { "font": { "family": { - "value": "'Font Awesome 6 Free', FontAwesome", + "value": "'gcds-icons'", "type": "fontFamilies" }, "size": { @@ -3081,6 +3081,38 @@ "h1": { "value": "2.5625rem", "type": "fontSizes" + }, + "textSmallMobile": { + "value": "1rem", + "type": "fontSizes" + }, + "textMobile": { + "value": "1.125rem", + "type": "fontSizes" + }, + "h6Mobile": { + "value": "1.25rem", + "type": "fontSizes" + }, + "h5Mobile": { + "value": "1.375rem", + "type": "fontSizes" + }, + "h4Mobile": { + "value": "1.5rem", + "type": "fontSizes" + }, + "h3Mobile": { + "value": "1.625rem", + "type": "fontSizes" + }, + "h2Mobile": { + "value": "2.1875rem", + "type": "fontSizes" + }, + "h1Mobile": { + "value": "2.3125rem", + "type": "fontSizes" } } }, @@ -3116,6 +3148,38 @@ "h1": { "value": "117%", "type": "lineHeights" + }, + "textSmallMobile": { + "value": "150%", + "type": "lineHeights" + }, + "textMobile": { + "value": "155%", + "type": "lineHeights" + }, + "h6Mobile": { + "value": "140%", + "type": "lineHeights" + }, + "h5Mobile": { + "value": "127%", + "type": "lineHeights" + }, + "h4Mobile": { + "value": "133%", + "type": "lineHeights" + }, + "h3Mobile": { + "value": "123%", + "type": "lineHeights" + }, + "h2Mobile": { + "value": "125%", + "type": "lineHeights" + }, + "h1Mobile": { + "value": "119%", + "type": "lineHeights" } }, "fixedWidth": { diff --git a/build/web/css/components.css b/build/web/css/components.css index 48ae3e85..e78b33bc 100644 --- a/build/web/css/components.css +++ b/build/web/css/components.css @@ -412,7 +412,7 @@ --gcds-heading-spacing-1250: 6.25rem; --gcds-hint-margin: -0.375rem 0 0.5rem; --gcds-hint-text: #43474e; - --gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; + --gcds-icon-font-family: 'gcds-icons'; --gcds-icon-font-size-text-small: 1.125rem; --gcds-icon-font-size-text: 1.25rem; --gcds-icon-font-size-h6: 1.375rem; @@ -421,6 +421,14 @@ --gcds-icon-font-size-h3: 1.8125rem; --gcds-icon-font-size-h2: 2.4375rem; --gcds-icon-font-size-h1: 2.5625rem; + --gcds-icon-font-size-text-small-mobile: 1rem; + --gcds-icon-font-size-text-mobile: 1.125rem; + --gcds-icon-font-size-h6-mobile: 1.25rem; + --gcds-icon-font-size-h5-mobile: 1.375rem; + --gcds-icon-font-size-h4-mobile: 1.5rem; + --gcds-icon-font-size-h3-mobile: 1.625rem; + --gcds-icon-font-size-h2-mobile: 2.1875rem; + --gcds-icon-font-size-h1-mobile: 2.3125rem; --gcds-icon-line-height-text-small: 155%; --gcds-icon-line-height-text: 160%; --gcds-icon-line-height-h6: 145%; @@ -429,6 +437,14 @@ --gcds-icon-line-height-h3: 137%; --gcds-icon-line-height-h2: 123%; --gcds-icon-line-height-h1: 117%; + --gcds-icon-line-height-text-small-mobile: 150%; + --gcds-icon-line-height-text-mobile: 155%; + --gcds-icon-line-height-h6-mobile: 140%; + --gcds-icon-line-height-h5-mobile: 127%; + --gcds-icon-line-height-h4-mobile: 133%; + --gcds-icon-line-height-h3-mobile: 123%; + --gcds-icon-line-height-h2-mobile: 125%; + --gcds-icon-line-height-h1-mobile: 119%; --gcds-icon-fixed-width-text-small: 1.55; --gcds-icon-fixed-width-text: 1.6; --gcds-icon-fixed-width-h6: 1.45; diff --git a/build/web/css/components/icon.css b/build/web/css/components/icon.css index 4f56c3df..f5aab745 100644 --- a/build/web/css/components/icon.css +++ b/build/web/css/components/icon.css @@ -3,7 +3,7 @@ */ :root { - --gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; + --gcds-icon-font-family: 'gcds-icons'; --gcds-icon-font-size-text-small: 1.125rem; --gcds-icon-font-size-text: 1.25rem; --gcds-icon-font-size-h6: 1.375rem; @@ -12,6 +12,14 @@ --gcds-icon-font-size-h3: 1.8125rem; --gcds-icon-font-size-h2: 2.4375rem; --gcds-icon-font-size-h1: 2.5625rem; + --gcds-icon-font-size-text-small-mobile: 1rem; + --gcds-icon-font-size-text-mobile: 1.125rem; + --gcds-icon-font-size-h6-mobile: 1.25rem; + --gcds-icon-font-size-h5-mobile: 1.375rem; + --gcds-icon-font-size-h4-mobile: 1.5rem; + --gcds-icon-font-size-h3-mobile: 1.625rem; + --gcds-icon-font-size-h2-mobile: 2.1875rem; + --gcds-icon-font-size-h1-mobile: 2.3125rem; --gcds-icon-line-height-text-small: 155%; --gcds-icon-line-height-text: 160%; --gcds-icon-line-height-h6: 145%; @@ -20,6 +28,14 @@ --gcds-icon-line-height-h3: 137%; --gcds-icon-line-height-h2: 123%; --gcds-icon-line-height-h1: 117%; + --gcds-icon-line-height-text-small-mobile: 150%; + --gcds-icon-line-height-text-mobile: 155%; + --gcds-icon-line-height-h6-mobile: 140%; + --gcds-icon-line-height-h5-mobile: 127%; + --gcds-icon-line-height-h4-mobile: 133%; + --gcds-icon-line-height-h3-mobile: 123%; + --gcds-icon-line-height-h2-mobile: 125%; + --gcds-icon-line-height-h1-mobile: 119%; --gcds-icon-fixed-width-text-small: 1.55; --gcds-icon-fixed-width-text: 1.6; --gcds-icon-fixed-width-h6: 1.45; diff --git a/build/web/css/global.css b/build/web/css/global.css index 5fada941..ff33bf90 100644 --- a/build/web/css/global.css +++ b/build/web/css/global.css @@ -97,7 +97,7 @@ --gcds-font-families-heading: 'Lato', sans-serif; --gcds-font-families-body: 'Noto Sans', sans-serif; --gcds-font-families-monospace: 'Noto Sans Mono', monospace; - --gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; + --gcds-font-families-icons: 'gcds-icons'; --gcds-font-sizes-text-small: 1.125rem; --gcds-font-sizes-text-small-mobile: 1rem; --gcds-font-sizes-text: 1.25rem; diff --git a/build/web/css/global/typography.css b/build/web/css/global/typography.css index 88e38a45..6e48a64a 100644 --- a/build/web/css/global/typography.css +++ b/build/web/css/global/typography.css @@ -29,7 +29,7 @@ --gcds-font-families-heading: 'Lato', sans-serif; --gcds-font-families-body: 'Noto Sans', sans-serif; --gcds-font-families-monospace: 'Noto Sans Mono', monospace; - --gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; + --gcds-font-families-icons: 'gcds-icons'; --gcds-font-sizes-text-small: 1.125rem; --gcds-font-sizes-text-small-mobile: 1rem; --gcds-font-sizes-text: 1.25rem; diff --git a/build/web/css/global/typography/fontFamilies.css b/build/web/css/global/typography/fontFamilies.css index 9aa97522..6af698c6 100644 --- a/build/web/css/global/typography/fontFamilies.css +++ b/build/web/css/global/typography/fontFamilies.css @@ -6,5 +6,5 @@ --gcds-font-families-heading: 'Lato', sans-serif; --gcds-font-families-body: 'Noto Sans', sans-serif; --gcds-font-families-monospace: 'Noto Sans Mono', monospace; - --gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; + --gcds-font-families-icons: 'gcds-icons'; } diff --git a/build/web/css/tokens.css b/build/web/css/tokens.css index 8e25346a..836617ea 100644 --- a/build/web/css/tokens.css +++ b/build/web/css/tokens.css @@ -216,7 +216,7 @@ --gcds-font-families-heading: 'Lato', sans-serif; --gcds-font-families-body: 'Noto Sans', sans-serif; --gcds-font-families-monospace: 'Noto Sans Mono', monospace; - --gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; + --gcds-font-families-icons: 'gcds-icons'; --gcds-font-sizes-text-small: 1.125rem; --gcds-font-sizes-text-small-mobile: 1rem; --gcds-font-sizes-text: 1.25rem; @@ -572,7 +572,7 @@ --gcds-heading-spacing-1250: 6.25rem; --gcds-hint-margin: -0.375rem 0 0.5rem; --gcds-hint-text: #43474e; - --gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; + --gcds-icon-font-family: 'gcds-icons'; --gcds-icon-font-size-text-small: 1.125rem; --gcds-icon-font-size-text: 1.25rem; --gcds-icon-font-size-h6: 1.375rem; @@ -581,6 +581,14 @@ --gcds-icon-font-size-h3: 1.8125rem; --gcds-icon-font-size-h2: 2.4375rem; --gcds-icon-font-size-h1: 2.5625rem; + --gcds-icon-font-size-text-small-mobile: 1rem; + --gcds-icon-font-size-text-mobile: 1.125rem; + --gcds-icon-font-size-h6-mobile: 1.25rem; + --gcds-icon-font-size-h5-mobile: 1.375rem; + --gcds-icon-font-size-h4-mobile: 1.5rem; + --gcds-icon-font-size-h3-mobile: 1.625rem; + --gcds-icon-font-size-h2-mobile: 2.1875rem; + --gcds-icon-font-size-h1-mobile: 2.3125rem; --gcds-icon-line-height-text-small: 155%; --gcds-icon-line-height-text: 160%; --gcds-icon-line-height-h6: 145%; @@ -589,6 +597,14 @@ --gcds-icon-line-height-h3: 137%; --gcds-icon-line-height-h2: 123%; --gcds-icon-line-height-h1: 117%; + --gcds-icon-line-height-text-small-mobile: 150%; + --gcds-icon-line-height-text-mobile: 155%; + --gcds-icon-line-height-h6-mobile: 140%; + --gcds-icon-line-height-h5-mobile: 127%; + --gcds-icon-line-height-h4-mobile: 133%; + --gcds-icon-line-height-h3-mobile: 123%; + --gcds-icon-line-height-h2-mobile: 125%; + --gcds-icon-line-height-h1-mobile: 119%; --gcds-icon-fixed-width-text-small: 1.55; --gcds-icon-fixed-width-text: 1.6; --gcds-icon-fixed-width-h6: 1.45; diff --git a/build/web/scss/components.scss b/build/web/scss/components.scss index a732f2f8..ea7fa1ab 100644 --- a/build/web/scss/components.scss +++ b/build/web/scss/components.scss @@ -410,7 +410,7 @@ $gcds-heading-spacing-1200: 6rem; $gcds-heading-spacing-1250: 6.25rem; $gcds-hint-margin: -0.375rem 0 0.5rem; $gcds-hint-text: #43474e; -$gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; +$gcds-icon-font-family: 'gcds-icons'; $gcds-icon-font-size-text-small: 1.125rem; $gcds-icon-font-size-text: 1.25rem; $gcds-icon-font-size-h6: 1.375rem; @@ -419,6 +419,14 @@ $gcds-icon-font-size-h4: 1.6875rem; $gcds-icon-font-size-h3: 1.8125rem; $gcds-icon-font-size-h2: 2.4375rem; $gcds-icon-font-size-h1: 2.5625rem; +$gcds-icon-font-size-text-small-mobile: 1rem; +$gcds-icon-font-size-text-mobile: 1.125rem; +$gcds-icon-font-size-h6-mobile: 1.25rem; +$gcds-icon-font-size-h5-mobile: 1.375rem; +$gcds-icon-font-size-h4-mobile: 1.5rem; +$gcds-icon-font-size-h3-mobile: 1.625rem; +$gcds-icon-font-size-h2-mobile: 2.1875rem; +$gcds-icon-font-size-h1-mobile: 2.3125rem; $gcds-icon-line-height-text-small: 155%; $gcds-icon-line-height-text: 160%; $gcds-icon-line-height-h6: 145%; @@ -427,6 +435,14 @@ $gcds-icon-line-height-h4: 133%; $gcds-icon-line-height-h3: 137%; $gcds-icon-line-height-h2: 123%; $gcds-icon-line-height-h1: 117%; +$gcds-icon-line-height-text-small-mobile: 150%; +$gcds-icon-line-height-text-mobile: 155%; +$gcds-icon-line-height-h6-mobile: 140%; +$gcds-icon-line-height-h5-mobile: 127%; +$gcds-icon-line-height-h4-mobile: 133%; +$gcds-icon-line-height-h3-mobile: 123%; +$gcds-icon-line-height-h2-mobile: 125%; +$gcds-icon-line-height-h1-mobile: 119%; $gcds-icon-fixed-width-text-small: 1.55; $gcds-icon-fixed-width-text: 1.6; $gcds-icon-fixed-width-h6: 1.45; diff --git a/build/web/scss/components/icon.scss b/build/web/scss/components/icon.scss index 6384551e..a1ab34e7 100644 --- a/build/web/scss/components/icon.scss +++ b/build/web/scss/components/icon.scss @@ -1,7 +1,7 @@ // Do not edit directly, this file was auto-generated. -$gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; +$gcds-icon-font-family: 'gcds-icons'; $gcds-icon-font-size-text-small: 1.125rem; $gcds-icon-font-size-text: 1.25rem; $gcds-icon-font-size-h6: 1.375rem; @@ -10,6 +10,14 @@ $gcds-icon-font-size-h4: 1.6875rem; $gcds-icon-font-size-h3: 1.8125rem; $gcds-icon-font-size-h2: 2.4375rem; $gcds-icon-font-size-h1: 2.5625rem; +$gcds-icon-font-size-text-small-mobile: 1rem; +$gcds-icon-font-size-text-mobile: 1.125rem; +$gcds-icon-font-size-h6-mobile: 1.25rem; +$gcds-icon-font-size-h5-mobile: 1.375rem; +$gcds-icon-font-size-h4-mobile: 1.5rem; +$gcds-icon-font-size-h3-mobile: 1.625rem; +$gcds-icon-font-size-h2-mobile: 2.1875rem; +$gcds-icon-font-size-h1-mobile: 2.3125rem; $gcds-icon-line-height-text-small: 155%; $gcds-icon-line-height-text: 160%; $gcds-icon-line-height-h6: 145%; @@ -18,6 +26,14 @@ $gcds-icon-line-height-h4: 133%; $gcds-icon-line-height-h3: 137%; $gcds-icon-line-height-h2: 123%; $gcds-icon-line-height-h1: 117%; +$gcds-icon-line-height-text-small-mobile: 150%; +$gcds-icon-line-height-text-mobile: 155%; +$gcds-icon-line-height-h6-mobile: 140%; +$gcds-icon-line-height-h5-mobile: 127%; +$gcds-icon-line-height-h4-mobile: 133%; +$gcds-icon-line-height-h3-mobile: 123%; +$gcds-icon-line-height-h2-mobile: 125%; +$gcds-icon-line-height-h1-mobile: 119%; $gcds-icon-fixed-width-text-small: 1.55; $gcds-icon-fixed-width-text: 1.6; $gcds-icon-fixed-width-h6: 1.45; diff --git a/build/web/scss/global.scss b/build/web/scss/global.scss index 6ca3f4a8..35d8af60 100644 --- a/build/web/scss/global.scss +++ b/build/web/scss/global.scss @@ -95,7 +95,7 @@ $gcds-font-text-small-mobile: 400 1rem/150% 'Noto Sans', sans-serif; $gcds-font-families-heading: 'Lato', sans-serif; $gcds-font-families-body: 'Noto Sans', sans-serif; $gcds-font-families-monospace: 'Noto Sans Mono', monospace; -$gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; +$gcds-font-families-icons: 'gcds-icons'; $gcds-font-sizes-text-small: 1.125rem; $gcds-font-sizes-text-small-mobile: 1rem; $gcds-font-sizes-text: 1.25rem; diff --git a/build/web/scss/global/typography.scss b/build/web/scss/global/typography.scss index 497b280d..a34dc67f 100644 --- a/build/web/scss/global/typography.scss +++ b/build/web/scss/global/typography.scss @@ -27,7 +27,7 @@ $gcds-font-text-small-mobile: 400 1rem/150% 'Noto Sans', sans-serif; $gcds-font-families-heading: 'Lato', sans-serif; $gcds-font-families-body: 'Noto Sans', sans-serif; $gcds-font-families-monospace: 'Noto Sans Mono', monospace; -$gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; +$gcds-font-families-icons: 'gcds-icons'; $gcds-font-sizes-text-small: 1.125rem; $gcds-font-sizes-text-small-mobile: 1rem; $gcds-font-sizes-text: 1.25rem; diff --git a/build/web/scss/global/typography/fontFamilies.scss b/build/web/scss/global/typography/fontFamilies.scss index 0905f75b..d46ef1ea 100644 --- a/build/web/scss/global/typography/fontFamilies.scss +++ b/build/web/scss/global/typography/fontFamilies.scss @@ -4,4 +4,4 @@ $gcds-font-families-heading: 'Lato', sans-serif; $gcds-font-families-body: 'Noto Sans', sans-serif; $gcds-font-families-monospace: 'Noto Sans Mono', monospace; -$gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; +$gcds-font-families-icons: 'gcds-icons'; diff --git a/build/web/scss/tokens.scss b/build/web/scss/tokens.scss index 7c4bacfc..5622bbe0 100644 --- a/build/web/scss/tokens.scss +++ b/build/web/scss/tokens.scss @@ -214,7 +214,7 @@ $gcds-font-text-small-mobile: 400 1rem/150% 'Noto Sans', sans-serif; $gcds-font-families-heading: 'Lato', sans-serif; $gcds-font-families-body: 'Noto Sans', sans-serif; $gcds-font-families-monospace: 'Noto Sans Mono', monospace; -$gcds-font-families-icons: 'Font Awesome 6 Free', FontAwesome; +$gcds-font-families-icons: 'gcds-icons'; $gcds-font-sizes-text-small: 1.125rem; $gcds-font-sizes-text-small-mobile: 1rem; $gcds-font-sizes-text: 1.25rem; @@ -570,7 +570,7 @@ $gcds-heading-spacing-1200: 6rem; $gcds-heading-spacing-1250: 6.25rem; $gcds-hint-margin: -0.375rem 0 0.5rem; $gcds-hint-text: #43474e; -$gcds-icon-font-family: 'Font Awesome 6 Free', FontAwesome; +$gcds-icon-font-family: 'gcds-icons'; $gcds-icon-font-size-text-small: 1.125rem; $gcds-icon-font-size-text: 1.25rem; $gcds-icon-font-size-h6: 1.375rem; @@ -579,6 +579,14 @@ $gcds-icon-font-size-h4: 1.6875rem; $gcds-icon-font-size-h3: 1.8125rem; $gcds-icon-font-size-h2: 2.4375rem; $gcds-icon-font-size-h1: 2.5625rem; +$gcds-icon-font-size-text-small-mobile: 1rem; +$gcds-icon-font-size-text-mobile: 1.125rem; +$gcds-icon-font-size-h6-mobile: 1.25rem; +$gcds-icon-font-size-h5-mobile: 1.375rem; +$gcds-icon-font-size-h4-mobile: 1.5rem; +$gcds-icon-font-size-h3-mobile: 1.625rem; +$gcds-icon-font-size-h2-mobile: 2.1875rem; +$gcds-icon-font-size-h1-mobile: 2.3125rem; $gcds-icon-line-height-text-small: 155%; $gcds-icon-line-height-text: 160%; $gcds-icon-line-height-h6: 145%; @@ -587,6 +595,14 @@ $gcds-icon-line-height-h4: 133%; $gcds-icon-line-height-h3: 137%; $gcds-icon-line-height-h2: 123%; $gcds-icon-line-height-h1: 117%; +$gcds-icon-line-height-text-small-mobile: 150%; +$gcds-icon-line-height-text-mobile: 155%; +$gcds-icon-line-height-h6-mobile: 140%; +$gcds-icon-line-height-h5-mobile: 127%; +$gcds-icon-line-height-h4-mobile: 133%; +$gcds-icon-line-height-h3-mobile: 123%; +$gcds-icon-line-height-h2-mobile: 125%; +$gcds-icon-line-height-h1-mobile: 119%; $gcds-icon-fixed-width-text-small: 1.55; $gcds-icon-fixed-width-text: 1.6; $gcds-icon-fixed-width-h6: 1.45; diff --git a/tokens/components/icon/tokens.js b/tokens/components/icon/tokens.js index a43ba9b1..c60b0151 100644 --- a/tokens/components/icon/tokens.js +++ b/tokens/components/icon/tokens.js @@ -2,12 +2,16 @@ import heights from '../../global/typography/lineHeights.js'; const lineHeights = heights.lineHeights; -// Font sizes, line heights, and margin values +/** + * Font sizes, line heights, and margin values + */ const fontSizeKeys = ['textSmall', 'text', 'h6', 'h5', 'h4', 'h3', 'h2', 'h1']; const lineHeightKeys = fontSizeKeys; const marginKeys = [0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200, 1250]; -// Create font and lineHeight objects +/** + * Create font and lineHeight objects + */ const createPropertiesObject = (keys, type) => { return keys.reduce((acc, key) => { acc[key] = { @@ -24,15 +28,28 @@ const font = { value: '{fontFamilies.icons.value}', type: 'fontFamilies', }, - size: createPropertiesObject(fontSizeKeys, 'fontSizes'), + size: { + // Desktop font sizes + ...createPropertiesObject(fontSizeKeys, 'fontSizes'), + + // Mobile font sizes + ...createPropertiesObject(fontSizeKeys.map(key => `${key}Mobile`), 'fontSizes'), + }, }; -const lineHeight = createPropertiesObject(lineHeightKeys, 'lineHeights'); +const lineHeight = { + // Desktop line heights + ...createPropertiesObject(lineHeightKeys, 'lineHeights'), + + // Mobile line heights + ...createPropertiesObject(lineHeightKeys.map(key => `${key}Mobile`), 'lineHeights'), +}; /** * Iterate over lineHeightKeys array to compute fixed width values * from lineHeights into a standardized format. */ +// TODO: Will be removed in separate pull request const fixedWidth = lineHeightKeys.reduce((acc, key) => { // Get value associated with current key from lineHeights object const value = lineHeights[key].value; diff --git a/tokens/global/typography/fontFamilies.json b/tokens/global/typography/fontFamilies.json index a6060117..8ac70e2c 100644 --- a/tokens/global/typography/fontFamilies.json +++ b/tokens/global/typography/fontFamilies.json @@ -13,7 +13,7 @@ "type": "fontFamilies" }, "icons": { - "value": "'Font Awesome 6 Free', FontAwesome", + "value": "'gcds-icons'", "type": "fontFamilies" } }