Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(POC): Code Pro Font in Blau #1259

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .storybook/css/code-pro-font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Regular */
@font-face {
font-family: 'Code Pro';
font-style: normal;
font-weight: 400;
src: local('Code Regular');
}

/* Light */
@font-face {
font-family: 'Code Pro';
font-style: normal;
font-weight: 300;
src: local('Code Light');
}

/* Medium */
@font-face {
font-family: 'Code Pro';
font-style: normal;
font-weight: 500;
src: local('Code Bold');
}

/* Bold */
@font-face {
font-family: 'Code Pro';
font-style: normal;
font-weight: 700;
src: local('Code Bold');
}
4 changes: 4 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import './css/roboto.css';
import './css/vivo-font.css';
import './css/telefonica-font.css';
import './css/onair-font.css';
import './css/code-pro-font.css';
import './css/main.css';
import * as React from 'react';
import {
Expand Down Expand Up @@ -122,6 +123,9 @@ const MisticaThemeProvider = ({Story, context}): React.ReactElement => {
{(skin === O2_SKIN || skin === O2_NEW_SKIN || skin === MOVISTAR_SKIN) && (
<style>{`body {font-family: "On Air"}`}</style>
)}
{skin === BLAU_SKIN && (
<style>{`body {font-family: "Code Pro", -apple-system, "Roboto", "Helvetica", "Arial", sans-serif}`}</style>
)}
<Story {...context} />
</OverscrollColorProvider>
</ThemeContextProvider>
Expand Down
3 changes: 2 additions & 1 deletion playroom/frame-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
O2_NEW_SKIN,
TU_SKIN,
MOVISTAR_SKIN,
BLAU_SKIN,
} from '../src';

import type {ThemeConfig} from '../src';
Expand Down Expand Up @@ -50,7 +51,7 @@ const App = ({children, skinName}: {children: React.ReactNode; skinName: string}
? 'body {font-family: "On Air"}'
: ''
}

${skinName === BLAU_SKIN ? 'body {font-family: "Code Pro", -apple-system, "Roboto", "Helvetica", "Arial", sans-serif}' : ''}

*[class^='_1fu0koy1'] {
display: none;
Expand Down
38 changes: 19 additions & 19 deletions src/skins/blau.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,20 @@ export const getBlauSkin: GetKnownSkin = () => {
cardContentOverlay: `linear-gradient(180deg, ${applyAlpha(palette.grey6, 0)} 0%, ${applyAlpha(palette.grey6, 0.4)} 30%, ${applyAlpha(palette.grey6, 0.7)} 100%)`,
},
borderRadii: {
avatar: '50%',
bar: '999px',
button: '4px',
button: '2px',
input: '2px',
container: '4px',
legacyDisplay: '2px',
popup: '0px',
checkbox: '2px',
container: '8px',
indicator: '999px',
input: '8px',
legacyDisplay: '16px',
popup: '8px',
sheet: '8px',
mediaSmall: '8px',
indicator: '2px',
sheet: '2px',
bar: '2px',
avatar: '50%',
mediaSmall: '2px',
},
textPresets: {
cardTitle: {weight: 'regular'},
cardTitle: {weight: 'medium'},
button: {weight: 'medium'},
tabsLabel: {
weight: 'medium',
Expand All @@ -333,20 +333,20 @@ export const getBlauSkin: GetKnownSkin = () => {
},
link: {weight: 'medium'},
title1: {weight: 'medium'},
title2: {weight: 'light'},
title3: {weight: 'light', size: {mobile: 20, desktop: 28}, lineHeight: {mobile: 24, desktop: 32}},
title2: {weight: 'bold'},
title3: {weight: 'bold', size: {mobile: 20, desktop: 28}, lineHeight: {mobile: 24, desktop: 32}},
indicator: {weight: 'medium'},
navigationBar: {weight: 'medium'},
text1: {size: {mobile: 12, desktop: 14}, lineHeight: {mobile: 16, desktop: 20}},
text2: {size: {mobile: 14, desktop: 16}, lineHeight: {mobile: 20, desktop: 24}},
text3: {size: {mobile: 16, desktop: 18}, lineHeight: {mobile: 24, desktop: 24}},
text4: {size: {mobile: 18, desktop: 20}, lineHeight: {mobile: 24, desktop: 28}},
text5: {weight: 'light', size: {mobile: 20, desktop: 28}, lineHeight: {mobile: 24, desktop: 32}},
text6: {weight: 'light', size: {mobile: 24, desktop: 32}, lineHeight: {mobile: 32, desktop: 40}},
text7: {weight: 'light', size: {mobile: 28, desktop: 40}, lineHeight: {mobile: 32, desktop: 48}},
text8: {weight: 'light', size: {mobile: 32, desktop: 48}, lineHeight: {mobile: 40, desktop: 56}},
text9: {weight: 'light', size: {mobile: 40, desktop: 56}, lineHeight: {mobile: 48, desktop: 64}},
text10: {weight: 'light', size: {mobile: 48, desktop: 64}, lineHeight: {mobile: 56, desktop: 72}},
text5: {weight: 'bold', size: {mobile: 20, desktop: 28}, lineHeight: {mobile: 24, desktop: 32}},
text6: {weight: 'bold', size: {mobile: 24, desktop: 32}, lineHeight: {mobile: 32, desktop: 40}},
text7: {weight: 'bold', size: {mobile: 28, desktop: 40}, lineHeight: {mobile: 32, desktop: 48}},
text8: {weight: 'bold', size: {mobile: 32, desktop: 48}, lineHeight: {mobile: 40, desktop: 56}},
text9: {weight: 'bold', size: {mobile: 40, desktop: 56}, lineHeight: {mobile: 48, desktop: 64}},
text10: {weight: 'bold', size: {mobile: 48, desktop: 64}, lineHeight: {mobile: 56, desktop: 72}},
},
};
return skin;
Expand Down
Loading