KyleAMathews / typography.js

A powerful toolkit for building websites with beautiful design
http://kyleamathews.github.io/typography.js/
MIT License
3.83k stars 181 forks source link

Base.less overrides my custom custom style #240

Open KLaci opened 4 years ago

KLaci commented 4 years ago

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

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?