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

Base.less overrides my custom custom style #240

Open
KLaci opened this issue Dec 8, 2019 · 0 comments
Open

Base.less overrides my custom custom style #240

KLaci opened this issue Dec 8, 2019 · 0 comments

Comments

@KLaci
Copy link

KLaci commented Dec 8, 2019

I've started a new project in Gatsby and added Typography.js support following the official tutorial. I'm using the following versions:

  • gatsby-plugin-typography: 2.3.18
  • typography: 0.16.19
  • gatsby: 2.18.7

This is my typography theme:

import Typography from 'typography';

const typography = new Typography({
    baseFontSize: '16px',
    baseLineHeight: 1.2,
    blockMarginBottom: 0,
    scaleRatio: 2,
    headerWeight: 400,
    headerLineHeight: 1,
    headerFontFamily: ['Volkhov', 'serif'],
    bodyFontFamily: ['Montserrat', 'Open Sans', 'sans-serif'],
    overrideStyles: ({ adjustFontSizeTo, rhythm }, options, styles) => ({
        h3: {
            marginBottom: '120px',
        },
    }),
})

export const { scale, rhythm, options } = typography
export default typography

However in Chrome, I cannot see the expected result. Some properties are applied. e.g. fontFamily. Some are not, e.g. overrideStyles, color.

image

Do you know what can cause this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant