diff --git a/src/pages/docs/background-image.mdx b/src/pages/docs/background-image.mdx index 838775893..788b5ebe0 100644 --- a/src/pages/docs/background-image.mdx +++ b/src/pages/docs/background-image.mdx @@ -48,6 +48,12 @@ You can add your own background images by editing the `theme.backgroundImage` se backgroundImage: theme => ({ + 'hero-pattern': "url('/img/hero-pattern.svg')", + 'footer-texture': "url('/img/footer-texture.png')", ++ brand: { ++ logo: { ++ default: "url('/img/brand-logo.svg')", ++ alt: "url('/img/brand-logo-alt.svg')", ++ } ++ } }) } } @@ -56,7 +62,7 @@ You can add your own background images by editing the `theme.backgroundImage` se These don't just have to be gradients — they can be any background images you need. -These classes will take the form `bg-{key}`, so `hero-pattern` will become `bg-hero-pattern` for example. +These classes will take the form `bg-{key}`, so `hero-pattern` will become `bg-hero-pattern`, `brand.logo.default` will become `bg-brand-logo` and `brand.logo.alt` will become `bg-brand-logo-alt`, for example. ### Responsive and pseudo-class variants diff --git a/src/pages/docs/customizing-colors.mdx b/src/pages/docs/customizing-colors.mdx index cee2713cc..a26502b51 100644 --- a/src/pages/docs/customizing-colors.mdx +++ b/src/pages/docs/customizing-colors.mdx @@ -39,14 +39,17 @@ module.exports = { indigo: { lighter: '#b3bcf5', default: '#5c6ac4', - dark: '#202e78', - } + dark: { + default: '#202e78', + 50: 'rgba(32,46,120,.5)' + }, + }, } } } ``` -Like many other places in Tailwind, the `default` key is special and means "no modifier", so this configuration would generate classes like `.text-indigo-lighter`, `.text-indigo`, and `.text-indigo-dark`. +Like many other places in Tailwind, the `default` key is special and means "no modifier", so this configuration would generate classes like `.text-indigo-lighter`, `.text-indigo`, `.text-indigo-dark` and `.text-indigo-dark-50`. Note that you need to use dot notation to access nested colors when using the `theme()` function — the colors are only converted to dash-case for the actual CSS class names. The `default` key also needs to be specified when accessed via the `theme()` function: `theme('colors.indigo.default')`.