From 56fbefec1f08606124b0c4e0478d119ee23837fc Mon Sep 17 00:00:00 2001 From: Pete Schuster Date: Thu, 14 Sep 2017 15:05:18 -0400 Subject: [PATCH] updates font cdn path, adds font helper mixin (#2) * init path and helper * bump versions, use helper --- README.md | 40 +-------- assets/sass/_xfinity_standard_fonts.scss | 107 +++++++++++++---------- package.json | 2 +- 3 files changed, 67 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index a24c6cb..834705b 100755 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Welcome to the All Digital brought to you by Comcast. In your project: ```bash -npm install git+https://github.com/Comcast/all-digital.git#v1.10.1 +npm install git+https://github.com/Comcast/all-digital.git#v1.12.0 ``` ## Usage @@ -20,21 +20,7 @@ Include everything: ```css @import '../../node_modules/all-digital/assets/sass/xfinity_standard_fonts'; - -@include xfinity-standard-thin; -@include xfinity-standard-thin-italic; -@include xfinity-standard-extra-light; -@include xfinity-standard-extra-light-italic; -@include xfinity-standard-light; -@include xfinity-standard-light-italic; -@include xfinity-standard-regular; -@include xfinity-standard-regular-italic; -@include xfinity-standard-medium; -@include xfinity-standard-medium-italic; -@include xfinity-standard-bold; -@include xfinity-standard-bold-italic; -@include xfinity-standard-condensed-medium; -@include xfinity-standard-condensed-bold; +@include xfinity-standard-all; @import '../../node_modules/all-digital/assets/sass/all-digital'; ``` @@ -43,11 +29,7 @@ Take what you need: ```css @import '../../node_modules/all-digital/assets/sass/xfinity_standard_fonts'; - -@include xfinity-standard-regular; -@include xfinity-standard-regular-italic; -@include xfinity-standard-bold; -@include xfinity-standard-bold-italic; +@include xfinity-standard-all; @import '../../node_modules/all-digital/assets/sass/all-digital/vendors'; @import '../../node_modules/all-digital/assets/sass/all-digital/utils'; @@ -62,21 +44,7 @@ Take what you need: ```css // fonts @import '../../node_modules/all-digital/assets/sass/xfinity_standard_fonts'; - -@include xfinity-standard-thin; -// @include xfinity-standard-thin-italic; -@include xfinity-standard-extra-light; -// @include xfinity-standard-extra-light-italic; -@include xfinity-standard-light; -@include xfinity-standard-light-italic; -@include xfinity-standard-regular; -// @include xfinity-standard-regular-italic; -@include xfinity-standard-medium; -@include xfinity-standard-medium-italic; -// @include xfinity-standard-bold; -// @include xfinity-standard-bold-italic; -// @include xfinity-standard-condensed-medium; -// @include xfinity-standard-condensed-bold; +@include xfinity-standard-all; // Vendors // contains all the CSS files from diff --git a/assets/sass/_xfinity_standard_fonts.scss b/assets/sass/_xfinity_standard_fonts.scss index 4f638f4..a2bf3d2 100755 --- a/assets/sass/_xfinity_standard_fonts.scss +++ b/assets/sass/_xfinity_standard_fonts.scss @@ -1,14 +1,14 @@ -$xfinity-standard-fallback: helvetica, arial, sans-serif; +$xfinity-standard-fallback: helvetica, arial, sans-serif; -$xfinity-standard: 'XfinityStandard', #{$xfinity-standard-fallback}; -$xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standard-fallback}; +$xfinity-standard: 'XfinityStandard', #{$xfinity-standard-fallback}; +$xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standard-fallback}; @mixin xfinity-standard-thin { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Thin.ttf') format('truetype'); font-weight: 100; font-style: normal; } @@ -17,9 +17,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-thin-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ThinItalic.ttf') format('truetype'); font-weight: 100; font-style: italic; } @@ -28,9 +28,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-extra-light { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLight.ttf') format('truetype'); font-weight: 200; font-style: normal; } @@ -39,9 +39,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-extra-light-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-ExtraLightItalic.ttf') format('truetype'); font-weight: 200; font-style: italic; } @@ -50,9 +50,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-light { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Light.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Light.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Light.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Light.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Light.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; } @@ -61,9 +61,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-light-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-LightItalic.ttf') format('truetype'); font-weight: 300; font-style: italic; } @@ -72,9 +72,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-regular { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; } @@ -83,9 +83,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-regular-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-RegularItalic.ttf') format('truetype'); font-weight: 400; font-style: italic; } @@ -94,9 +94,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-medium { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; } @@ -105,9 +105,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-medium-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-MediumItalic.ttf') format('truetype'); font-weight: 500; font-style: italic; } @@ -116,9 +116,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-bold { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; } @@ -127,9 +127,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-bold-italic { @font-face { font-family: 'XfinityStandard'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard/XfinityStandard-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; } @@ -138,9 +138,9 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-condensed-medium { @font-face { font-family: 'XfinityStandardCondensed'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; } @@ -149,10 +149,27 @@ $xfinity-standard-condensed: 'XfinityStandardCondensed', #{$xfinity-standar @mixin xfinity-standard-condensed-bold { @font-face { font-family: 'XfinityStandardCondensed'; - src: url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.woff2') format('woff2'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.woff') format('woff'), - url('https://edge.static-assets.top.comcast.net/staticsites/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.ttf') format('truetype'); + src: url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.woff2') format('woff2'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.woff') format('woff'), + url('https://sdx.xfinity.com/fonts/latest/Xfinity_Standard_Condensed/XfinityStandardCondensed-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; } } + +@mixin xfinity-standard-all { + @include xfinity-standard-thin; + @include xfinity-standard-thin-italic; + @include xfinity-standard-extra-light; + @include xfinity-standard-extra-light-italic; + @include xfinity-standard-light; + @include xfinity-standard-light-italic; + @include xfinity-standard-regular; + @include xfinity-standard-regular-italic; + @include xfinity-standard-medium; + @include xfinity-standard-medium-italic; + @include xfinity-standard-bold; + @include xfinity-standard-bold-italic; + @include xfinity-standard-condensed-medium; + @include xfinity-standard-condensed-bold; +} diff --git a/package.json b/package.json index 6a80393..d586451 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "all-digital", - "version": "1.11.0", + "version": "1.12.0", "description": "CSS for All Digital", "repository": { "type": "git",