Skip to content

Commit 4f7e99c

Browse files
authored
Merge pull request #85 from tailwindcss/make-docs-config-compatible-with-older-versions-of-node
Make docs config compatible with older versions of node
2 parents ef65ffe + d9f5f10 commit 4f7e99c

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

docs/tailwind.js

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
var config = require('../lib/index').defaultConfig()
22

3-
config.colors = {
4-
...config.colors,
5-
3+
config.colors = Object.assign(config.colors, {
64
'slate-darker': '#212b35',
75
'slate-dark': '#404e5c',
86
'slate': '#647382',
@@ -18,7 +16,7 @@ config.colors = {
1816
'tailwind-teal-light': '#5ebcca',
1917
'tailwind-teal': '#44a8b3',
2018
'tailwind-teal-dark': '#2f8696',
21-
}
19+
})
2220

2321
config.fonts = {
2422
'sans': 'Aktiv Grotesk, aktiv-grotesk, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue',
@@ -55,35 +53,30 @@ config.textColors = config.colors
5553

5654
config.backgroundColors = config.colors
5755

58-
config.borderWidths = {
56+
config.borderWidths = Object.assign(config.borderWidths, {
5957
'6': '6px',
60-
...config.borderWidths,
61-
}
58+
})
6259

63-
config.borderColors = {
60+
config.borderColors = Object.assign(config.colors, {
6461
default: config.colors['slate-lighter'],
65-
...config.colors,
66-
}
62+
})
6763

68-
config.width = {
64+
config.width = Object.assign(config.width, {
6965
'5': '1.25rem',
7066
'128': '32rem',
71-
...config.width,
72-
}
67+
})
7368

74-
config.height = {
69+
config.height = Object.assign(config.height, {
7570
'7': '1.75rem',
76-
...config.width,
77-
}
71+
})
7872

79-
config.padding = {
73+
config.padding = Object.assign(config.padding, {
8074
'10': '2.5rem',
8175
'12': '3rem',
8276
'16': '4rem',
8377
'20': '5rem',
8478
'80': '20rem',
85-
...config.padding,
86-
}
79+
})
8780

8881
config.margin = config.padding
8982

0 commit comments

Comments
 (0)