0

The default max-width of 'main' element is 1000px, I want to make it wider. I tried the customize style instruction but cannot locate the 'main' element or the 'rsg--content-xx' class by below config in 'styleguide.config.js'

styles: {
  StyleGuide: {
    'rsg--content': {
      maxWidth: 1300,
      width: 1300
    },
    '@global main': {
      maxWidth: 1300,
      width: 1300
    }
  }
}

Any help would be very appreciate.

Crusoe.Xia
  • 27
  • 3

2 Answers2

5

The styles function in the StyleGuideRenderer component takes the theme as the argument. maxWidth is set in the theme. You can override theme properties in styleguide.config.js:

module.exports = {
  theme: {
    maxWidth: 1300
  }
}
Joe Maffei
  • 1,855
  • 1
  • 15
  • 18
0

According to the docs it should be something like this:

styles: {
  StyleGuide: {
    content: {
      maxWidth: 1300
    }
  }
}
Artem Sapegin
  • 3,096
  • 2
  • 16
  • 20