Skip to content

Commit

Permalink
updates font cdn path, adds font helper mixin (#2)
Browse files Browse the repository at this point in the history
* init path and helper

* bump versions, use helper
  • Loading branch information
PeteSchuster authored and nhashmi committed Sep 14, 2017
1 parent 34b6644 commit 56fbefe
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 82 deletions.
40 changes: 4 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';
```
Expand All @@ -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';
Expand All @@ -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
Expand Down
107 changes: 62 additions & 45 deletions assets/sass/_xfinity_standard_fonts.scss
Original file line number Diff line number Diff line change
@@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "all-digital",
"version": "1.11.0",
"version": "1.12.0",
"description": "CSS for All Digital",
"repository": {
"type": "git",
Expand Down

0 comments on commit 56fbefe

Please sign in to comment.