mioe
mioe2y ago

How add custom colors to twind config?

my config:
import { Options } from "$fresh/plugins/twind.ts"

export default {
selfURL: import.meta.url,
} as Options
import { Options } from "$fresh/plugins/twind.ts"

export default {
selfURL: import.meta.url,
} as Options
3 Replies
ioB
ioB2y ago
A basic example:
import { Options } from "$fresh/plugins/twind.ts"

export default {
selfURL: import.meta.url,
theme: {
extend: {
colors: {
'midnight': '#121063',
}
}
}
} as Options
import { Options } from "$fresh/plugins/twind.ts"

export default {
selfURL: import.meta.url,
theme: {
extend: {
colors: {
'midnight': '#121063',
}
}
}
} as Options
Using twind/colors:
import { Options } from "$fresh/plugins/twind.ts"
import * as colors from "twind/colors";

export default {
selfURL: import.meta.url,
theme: {
extend: {
colors
}
}
} as Options
import { Options } from "$fresh/plugins/twind.ts"
import * as colors from "twind/colors";

export default {
selfURL: import.meta.url,
theme: {
extend: {
colors
}
}
} as Options
mioe
mioeOP2y ago
thx
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View